Spaces:
Sleeping
Sleeping
added transformers lib
Browse files- pages/1_Sentiment_Analysis.py +2 -1
- requirements.txt +1 -0
pages/1_Sentiment_Analysis.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import time
|
|
|
|
| 3 |
|
| 4 |
st.title('Sentiment Analysis')
|
| 5 |
|
|
@@ -7,7 +8,7 @@ st.subheader("Example: Single statement analysis")
|
|
| 7 |
with st.spinner('Wait for it...'):
|
| 8 |
time.sleep(5)
|
| 9 |
|
| 10 |
-
|
| 11 |
|
| 12 |
classifier = pipeline("sentiment-analysis")
|
| 13 |
results = classifier("Transformers library is very helpful.")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import time
|
| 3 |
+
from transformers import pipeline
|
| 4 |
|
| 5 |
st.title('Sentiment Analysis')
|
| 6 |
|
|
|
|
| 8 |
with st.spinner('Wait for it...'):
|
| 9 |
time.sleep(5)
|
| 10 |
|
| 11 |
+
|
| 12 |
|
| 13 |
classifier = pipeline("sentiment-analysis")
|
| 14 |
results = classifier("Transformers library is very helpful.")
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
|
|
| 1 |
numpy
|
| 2 |
pandas
|
|
|
|
| 1 |
+
transformers
|
| 2 |
numpy
|
| 3 |
pandas
|