Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,9 @@
|
|
|
|
1 |
from transformers import pipeline
|
2 |
|
3 |
classifier = pipeline("sentiment-analysis")
|
|
|
4 |
|
5 |
-
text
|
6 |
-
|
7 |
-
|
8 |
-
"""
|
9 |
-
|
10 |
-
res = classifier(text)
|
11 |
-
|
12 |
-
print(res)
|
|
|
1 |
+
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
classifier = pipeline("sentiment-analysis")
|
5 |
+
text = st.text_area("enter some text: ")
|
6 |
|
7 |
+
if text:
|
8 |
+
out = classifier(text)
|
9 |
+
st.json(out)
|
|
|
|
|
|
|
|
|
|