Spaces:
Runtime error
Runtime error
matthewwang16czap
commited on
Commit
•
925e8f1
1
Parent(s):
3824ff3
add features
Browse files- app.py +6 -2
- requirement.txt +1 -0
app.py
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
import streamlit as st
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
st.
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
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 |
+
sentiment_pipeline = st.selectbox('Which model to predict?', model_list)
|
7 |
+
text = st.text_input("text for sentiment analysis", value="I love you")
|
8 |
+
st.write(sentiment_pipeline(text))
|
requirement.txt
CHANGED
@@ -2,3 +2,4 @@ streamlit
|
|
2 |
opencv-python-headless
|
3 |
numpy
|
4 |
transformers
|
|
|
|
2 |
opencv-python-headless
|
3 |
numpy
|
4 |
transformers
|
5 |
+
pandas
|