furquan commited on
Commit
9084855
1 Parent(s): f21d7c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -163,11 +163,11 @@ def sentiment_analysis(tweets,topic):
163
 
164
  with gr.Blocks() as app:
165
  topic = gr.Textbox(label="Enter a topic for tweets")
166
- output = [gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="50"), gr.Image(label="Sentiment Analysis Result")]
 
 
167
  greet_btn = gr.Button("Initiate Sentiment Analysis")
168
- greet_btn.click(fn=collect_tweets, inputs=topic, 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
 
 
163
 
164
  with gr.Blocks() as app:
165
  topic = gr.Textbox(label="Enter a topic for tweets")
166
+ with gr.Row():
167
+ output1 = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="auto", container=True)
168
+ output2 = gr.Image(label="Sentiment Analysis Result")
169
  greet_btn = gr.Button("Initiate Sentiment Analysis")
170
+ greet_btn.click(collect_tweets, inputs=topic, outputs=[output1, output2])
 
 
171
 
172
  app.launch()
173