Rename hello.py to app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
from transformers import pipeline
|
3 |
+
import streamlit as st
|
4 |
+
|
5 |
+
st.heading("Sentiment analysis app using transformers")
|
6 |
+
sentiment_task = pipeline("sentiment-analysis")
|
7 |
+
text=st.text_area("enter text here to get the sentiment")
|
8 |
+
if text:
|
9 |
+
res=sentiment_task(text)
|
10 |
+
st.json(res)
|
hello.py
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
print("hellow world")
|
|
|
|