Spaces:
No application file
No application file
Commit
·
656d89a
1
Parent(s):
f904861
Delete stream_trainer.py
Browse files- stream_trainer.py +0 -15
stream_trainer.py
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
from textblob import TextBlob
|
3 |
-
|
4 |
-
def analyze_sentiment(text):
|
5 |
-
blob = TextBlob(text)
|
6 |
-
return blob.sentiment.polarity
|
7 |
-
|
8 |
-
st.title("Sentiment Analysis App")
|
9 |
-
file_uploader = st.file_uploader("Upload File", type="txt")
|
10 |
-
if file_uploader:
|
11 |
-
uploaded_file = file_uploader.read()
|
12 |
-
sentiment = analyze_sentiment(uploaded_file)
|
13 |
-
st.write(f"The sentiment score is {sentiment}")
|
14 |
-
else:
|
15 |
-
st.write("Please upload a file.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|