Spaces:
Runtime error
Runtime error
Commit
·
b4aeeaf
1
Parent(s):
0551e7e
Update app.py
Browse files
app.py
CHANGED
@@ -26,27 +26,34 @@ def article_selection(sentiment):
|
|
26 |
return f"""The sentence you requested is Neutral!"""
|
27 |
|
28 |
def thanks():
|
29 |
-
return "Thank you for making our model better!"
|
30 |
|
31 |
-
|
32 |
This application recommends news articles depending on the sentiment of the headline.
|
33 |
Enter your preference of what type of news articles you would like recommended to you today: Positive, Negative, or Neutral.
|
34 |
'''
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
suggestion_demo = gr.Interface(
|
37 |
fn=article_selection,
|
38 |
title = 'Recommending News Articles',
|
39 |
inputs = gr.Dropdown(["Positive","Negative","Neutral"], label="What type of news articles would you like recommended?"),
|
40 |
outputs = gr.Textbox(label="Recommended News Articles", lines=3),
|
41 |
-
description =
|
42 |
-
|
43 |
|
44 |
manual_label_demo = gr.Interface(
|
45 |
fn=thanks,
|
46 |
title="Manually Label a News Article",
|
47 |
inputs=[gr.Textbox(label = "Paste in URL of news article here."),
|
48 |
gr.Dropdown(["Positive","Negative","Neutral"], label="Select the sentiment of the news article.")],
|
49 |
-
outputs = gr.Textbox()
|
|
|
50 |
)
|
51 |
|
52 |
|
|
|
26 |
return f"""The sentence you requested is Neutral!"""
|
27 |
|
28 |
def thanks():
|
29 |
+
return f"""Thank you for making our model better!"""
|
30 |
|
31 |
+
description1 = '''
|
32 |
This application recommends news articles depending on the sentiment of the headline.
|
33 |
Enter your preference of what type of news articles you would like recommended to you today: Positive, Negative, or Neutral.
|
34 |
'''
|
35 |
|
36 |
+
description2 = '''
|
37 |
+
This application recommends news articles depending on the sentiment of the headline.
|
38 |
+
Enter a news article url and its sentiment to help us improve our model.
|
39 |
+
The more data we have, the better news articles we can recommend to you!
|
40 |
+
'''
|
41 |
+
|
42 |
suggestion_demo = gr.Interface(
|
43 |
fn=article_selection,
|
44 |
title = 'Recommending News Articles',
|
45 |
inputs = gr.Dropdown(["Positive","Negative","Neutral"], label="What type of news articles would you like recommended?"),
|
46 |
outputs = gr.Textbox(label="Recommended News Articles", lines=3),
|
47 |
+
description = description1
|
48 |
+
)
|
49 |
|
50 |
manual_label_demo = gr.Interface(
|
51 |
fn=thanks,
|
52 |
title="Manually Label a News Article",
|
53 |
inputs=[gr.Textbox(label = "Paste in URL of news article here."),
|
54 |
gr.Dropdown(["Positive","Negative","Neutral"], label="Select the sentiment of the news article.")],
|
55 |
+
outputs = gr.Textbox(),
|
56 |
+
description = description1
|
57 |
)
|
58 |
|
59 |
|