Spaces:
Runtime error
Runtime error
wira.indra
commited on
Commit
·
d6501eb
1
Parent(s):
ea552db
add twitter feature
Browse files
app.py
CHANGED
@@ -76,8 +76,6 @@ if __name__ == "__main__":
|
|
76 |
sent_output = gr.Textbox(label="Sentiment Analysis")
|
77 |
ner_output = gr.Textbox(label="Named Entity Recognition")
|
78 |
|
79 |
-
analyze_button.click(sentiment_ner, input_text, [sent_output, ner_output])
|
80 |
-
|
81 |
# sentiment_demo = gr.Interface(
|
82 |
# fn=sentiment_analysis,
|
83 |
# inputs="text",
|
@@ -114,11 +112,12 @@ if __name__ == "__main__":
|
|
114 |
max_rows=(20,'fixed'),
|
115 |
overflow_row_behaviour='paginate',
|
116 |
wrap=True)
|
117 |
-
|
|
|
|
|
118 |
inputs=[keyword_textbox, max_tweets_component],
|
119 |
outputs=[plot_component, dataframe_component])
|
120 |
|
121 |
-
|
122 |
gr.Markdown(
|
123 |
"""
|
124 |
|
@@ -126,4 +125,4 @@ if __name__ == "__main__":
|
|
126 |
|
127 |
)
|
128 |
|
129 |
-
|
|
|
76 |
sent_output = gr.Textbox(label="Sentiment Analysis")
|
77 |
ner_output = gr.Textbox(label="Named Entity Recognition")
|
78 |
|
|
|
|
|
79 |
# sentiment_demo = gr.Interface(
|
80 |
# fn=sentiment_analysis,
|
81 |
# inputs="text",
|
|
|
112 |
max_rows=(20,'fixed'),
|
113 |
overflow_row_behaviour='paginate',
|
114 |
wrap=True)
|
115 |
+
|
116 |
+
analyze_button.click(sentiment_ner, input_text, [sent_output, ner_output])
|
117 |
+
submit_button.click(twitter_analyzer,
|
118 |
inputs=[keyword_textbox, max_tweets_component],
|
119 |
outputs=[plot_component, dataframe_component])
|
120 |
|
|
|
121 |
gr.Markdown(
|
122 |
"""
|
123 |
|
|
|
125 |
|
126 |
)
|
127 |
|
128 |
+
demo.launch(inbrowser=True)
|