Spaces:
Runtime error
Runtime error
matthewwang16czap
commited on
Commit
•
be54301
1
Parent(s):
22d679b
fix bugs
Browse files
app.py
CHANGED
@@ -4,7 +4,9 @@ import pandas as pd
|
|
4 |
|
5 |
model_list = ["distilbert-base-uncased-finetuned-sst-2-english", "cardiffnlp/twitter-roberta-base-sentiment", "finiteautomata/bertweet-base-sentiment-analysis"]
|
6 |
model_name = st.selectbox('Which model to predict?', model_list)
|
7 |
-
sentiment_pipeline = pipeline(model=model_name)
|
8 |
text = st.text_input("text for sentiment analysis", value="I love you")
|
9 |
-
|
10 |
-
st.
|
|
|
|
|
|
|
|
4 |
|
5 |
model_list = ["distilbert-base-uncased-finetuned-sst-2-english", "cardiffnlp/twitter-roberta-base-sentiment", "finiteautomata/bertweet-base-sentiment-analysis"]
|
6 |
model_name = st.selectbox('Which model to predict?', model_list)
|
|
|
7 |
text = st.text_input("text for sentiment analysis", value="I love you")
|
8 |
+
|
9 |
+
if st.button('Run'):
|
10 |
+
sentiment_pipeline = pipeline(model=model_name)
|
11 |
+
result = sentiment_pipeline(text)
|
12 |
+
st.write(result)
|