Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import transformers
|
| 3 |
+
from transformers import pipeline
|
| 4 |
+
pipe = pipeline("text-classification", model="cardiffnlp/twitter-roberta-base-sentiment-latest")
|
| 5 |
+
|
| 6 |
+
text = st.text_input("Enter your quote here")
|
| 7 |
+
if text:
|
| 8 |
+
st.write(pipe(text))
|