forked from avinashkranjan/Amazing-Python-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
33 lines (27 loc) · 1.05 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from TwitterTweetSentimentalAnalysis import Model
import getpass
class app(object):
@staticmethod
def run_app():
try:
candidate_key = getpass.getpass(
prompt='enter your candidate Key : ')
candidate_sec = getpass.getpass(
prompt='enter your candidate secret Key : ')
access_key = getpass.getpass(prompt='enter your access Key : ')
access_sec = getpass.getpass(
prompt='enter your access secret Key : ')
except Exception as E:
print('There is an Error : ', E)
else:
model_object = Model.model(
candidate_key, candidate_sec, access_key, access_sec)
print(model_object.get_authenticated_api())
text = input(
" Enter the tag you want to perform sentimental analysis on : ")
result = model_object.detailed_analysis_tweet_data(text)
for i in result:
print(i)
if __name__ == "__main__":
object = app()
object.run_app()