Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import transformers
|
| 3 |
import torch
|
|
|
|
| 4 |
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
|
| 5 |
|
|
|
|
|
|
|
| 6 |
# Define the paths of the pre-trained models
|
| 7 |
model1_path = "saisi/finetuned-Sentiment-classfication-ROBERTA-model"
|
| 8 |
model2_path = "saisi/finetuned-Sentiment-classfication-DISTILBERT-model"
|
|
@@ -78,6 +81,9 @@ def app():
|
|
| 78 |
# Define the app title
|
| 79 |
st.title("Sentiment Analysis")
|
| 80 |
|
|
|
|
|
|
|
|
|
|
| 81 |
# Define the input field
|
| 82 |
text_input = st.text_input("Enter text:")
|
| 83 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import transformers
|
| 3 |
import torch
|
| 4 |
+
from PIL import Image
|
| 5 |
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
|
| 6 |
|
| 7 |
+
image1 = Image.open("9850903.png")
|
| 8 |
+
|
| 9 |
# Define the paths of the pre-trained models
|
| 10 |
model1_path = "saisi/finetuned-Sentiment-classfication-ROBERTA-model"
|
| 11 |
model2_path = "saisi/finetuned-Sentiment-classfication-DISTILBERT-model"
|
|
|
|
| 81 |
# Define the app title
|
| 82 |
st.title("Sentiment Analysis")
|
| 83 |
|
| 84 |
+
# Open the image file
|
| 85 |
+
st.image(image1)
|
| 86 |
+
|
| 87 |
# Define the input field
|
| 88 |
text_input = st.text_input("Enter text:")
|
| 89 |
|