Spaces:
Runtime error
Runtime error
NazmusAshrafi
commited on
Commit
•
ebb742b
1
Parent(s):
0813f03
Added reqs
Browse files- app.py +13 -2
- requirements.txt +2 -0
app.py
CHANGED
@@ -1,4 +1,15 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer
|
3 |
|
4 |
+
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
|
5 |
+
|
6 |
+
pulled_model = AutoModelForSequenceClassification.from_pretrained(
|
7 |
+
"NazmusAshrafi/stock_twitter_sentiment_Bert")
|
8 |
+
|
9 |
+
classifier = pipeline("sentiment-analysis",
|
10 |
+
model=pulled_model, tokenizer=tokenizer)
|
11 |
+
|
12 |
+
|
13 |
+
print(classifier("AAP Up Theory = Will go up in future, buy now"))
|
14 |
+
|
15 |
+
st.title("Topic Modeling and Sentiment Analysis of Stock Tweets")
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
transformers
|
2 |
+
torch
|