furquan commited on
Commit
29d3eff
·
1 Parent(s): 9e4e74d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -161,10 +161,13 @@ def sentiment_analysis(tweets,topic):
161
  return plot
162
 
163
 
 
 
 
 
 
164
 
165
-
166
-
167
- app = gr.Interface(fn=collect_tweets, inputs=gr.Textbox(label="Enter a topic for tweets"), outputs=[gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="50"), gr.Image(label="Sentiment Analysis Result")])
168
 
169
  app.launch()
170
 
 
161
  return plot
162
 
163
 
164
+ with gr.Blocks() as app:
165
+ topic = gr.Textbox(label="Enter a topic for tweets")
166
+ output = [gr.Textbox(label="Output Box"), gr.Image(label="Sentiment Analysis Result")]
167
+ greet_btn = gr.Button("Initiate Sentiment Analysis")
168
+ greet_btn.click(fn=collect_tweets, inputs=name, outputs=output)
169
 
170
+ #app = gr.Interface(fn=collect_tweets, inputs=gr.Textbox(label="Enter a topic for tweets"), outputs=[gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="50"), gr.Image(label="Sentiment Analysis Result")])
 
 
171
 
172
  app.launch()
173