Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ import requests
|
|
9 |
import os
|
10 |
import tweepy
|
11 |
import pandas as pd
|
|
|
12 |
|
13 |
consumer_key = os.environ["API_KEY"]
|
14 |
consumer_secret = os.environ["API_KEY_SECRET"]
|
@@ -69,7 +70,7 @@ with gr.Blocks() as demo:
|
|
69 |
text_button = gr.Button('Analyse Sentiment')
|
70 |
output_text_sentiment = gr.Image(type="pil")
|
71 |
text_button.click(analyse, inputs = inputs_text, outputs = output_text_sentiment)
|
72 |
-
|
73 |
search_words=gr.Textbox(placeholder='Type your key word to search the tweets', label='Text')
|
74 |
text_button_tweet = gr.Button('Analyse Sentiment from 10 realated tweets')
|
75 |
output_tweet_sentiment = gr.Textbox(placeholder='Sentiment for 10 realated tweets')
|
|
|
9 |
import os
|
10 |
import tweepy
|
11 |
import pandas as pd
|
12 |
+
from dotenv import load_dotenv
|
13 |
|
14 |
consumer_key = os.environ["API_KEY"]
|
15 |
consumer_secret = os.environ["API_KEY_SECRET"]
|
|
|
70 |
text_button = gr.Button('Analyse Sentiment')
|
71 |
output_text_sentiment = gr.Image(type="pil")
|
72 |
text_button.click(analyse, inputs = inputs_text, outputs = output_text_sentiment)
|
73 |
+
|
74 |
search_words=gr.Textbox(placeholder='Type your key word to search the tweets', label='Text')
|
75 |
text_button_tweet = gr.Button('Analyse Sentiment from 10 realated tweets')
|
76 |
output_tweet_sentiment = gr.Textbox(placeholder='Sentiment for 10 realated tweets')
|