Spaces:
Sleeping
Sleeping
Merge branch 'main' of https://huggingface.co/spaces/MrDdz/Tweet-Sentiment-Analysis
Browse files- app.py +3 -4
- images.png +0 -0
- requirements.txt +3 -0
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
import transformers
|
3 |
-
|
4 |
|
5 |
# Load the model and tokenizer
|
6 |
model = transformers.AutoModelForSequenceClassification.from_pretrained("MrDdz/mytuned_test_trainer-base-cased1")
|
@@ -29,13 +29,12 @@ st.set_page_config(
|
|
29 |
|
30 |
# Add description and title
|
31 |
st.write("""
|
32 |
-
#
|
33 |
-
Please type your text and press ENTER key to know if your text is positive, negative, or neutral sentiment!
|
34 |
""")
|
35 |
|
36 |
|
37 |
# Add image
|
38 |
-
image = st.image("
|
39 |
|
40 |
# Get user input
|
41 |
text = st.text_input("Type here:")
|
|
|
1 |
import streamlit as st
|
2 |
import transformers
|
3 |
+
import torch
|
4 |
|
5 |
# Load the model and tokenizer
|
6 |
model = transformers.AutoModelForSequenceClassification.from_pretrained("MrDdz/mytuned_test_trainer-base-cased1")
|
|
|
29 |
|
30 |
# Add description and title
|
31 |
st.write("""
|
32 |
+
# Sentiment Analysis App
|
|
|
33 |
""")
|
34 |
|
35 |
|
36 |
# Add image
|
37 |
+
image = st.image("images.png", width=200)
|
38 |
|
39 |
# Get user input
|
40 |
text = st.text_input("Type here:")
|
images.png
ADDED
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
transformers
|
2 |
+
torch
|
3 |
+
streamlit
|