furquan commited on
Commit
d3e4b8e
1 Parent(s): bd54057

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,7 +20,7 @@ api_key_secret = os.environ.get('api_key_secret')
20
  access_token = os.environ.get('access_token')
21
  access_token_secret = os.environ.get('access_token_secret')
22
  huggingFaceAuth = os.environ.get('Huggingface_Authorization')
23
- print(huggingFaceAuth)
24
 
25
  # Authenticate with Twitter
26
  auth = tweepy.OAuthHandler(api_key, api_key_secret)
@@ -55,7 +55,7 @@ def drawTweet(tweet,i):
55
  formatted_string = ''
56
  for i, word in enumerate(words):
57
  formatted_string += word+' '
58
- if (i + 1) % 7 == 0:
59
  formatted_string += '\n'
60
 
61
 
@@ -166,7 +166,7 @@ with gr.Blocks() as app:
166
  with gr.Column():
167
  topic = gr.Textbox(label="Enter a topic for tweets")
168
  output2 = gr.Image(label="Sentiment Analysis Result")
169
- output1 = gr.Gallery(label="Screenshot of Tweets", show_label=True, elem_id="gallery").style(grid=[3], height="50")
170
  greet_btn = gr.Button("Initiate Sentiment Analysis")
171
  greet_btn.click(collect_tweets, inputs=topic, outputs=[output1, output2])
172
 
 
20
  access_token = os.environ.get('access_token')
21
  access_token_secret = os.environ.get('access_token_secret')
22
  huggingFaceAuth = os.environ.get('Huggingface_Authorization')
23
+
24
 
25
  # Authenticate with Twitter
26
  auth = tweepy.OAuthHandler(api_key, api_key_secret)
 
55
  formatted_string = ''
56
  for i, word in enumerate(words):
57
  formatted_string += word+' '
58
+ if (i + 1) % 10 == 0:
59
  formatted_string += '\n'
60
 
61
 
 
166
  with gr.Column():
167
  topic = gr.Textbox(label="Enter a topic for tweets")
168
  output2 = gr.Image(label="Sentiment Analysis Result")
169
+ output1 = gr.Gallery(label="Screenshot of Tweets", show_label=True, elem_id="gallery").style(grid=[3], height="50", width="80")
170
  greet_btn = gr.Button("Initiate Sentiment Analysis")
171
  greet_btn.click(collect_tweets, inputs=topic, outputs=[output1, output2])
172