Altered My Project File.
Browse files
app.py
CHANGED
|
@@ -4,8 +4,10 @@ import torch
|
|
| 4 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 5 |
|
| 6 |
# Load the model and tokenizer
|
| 7 |
-
tokenizer = AutoTokenizer.from_pretrained("ikoghoemmanuell/finetuned_sentiment_modell")
|
| 8 |
-
model = AutoModelForSequenceClassification.from_pretrained("ikoghoemmanuell/finetuned_sentiment_modell")
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Define the function for sentiment analysis
|
| 11 |
@st.cache_resource
|
|
@@ -36,7 +38,7 @@ Enter some text and we'll tell you if it has a positive, negative, or neutral se
|
|
| 36 |
|
| 37 |
|
| 38 |
# Add image
|
| 39 |
-
image = st.image("https://
|
| 40 |
|
| 41 |
# Get user input
|
| 42 |
text = st.text_input("Enter some text here:")
|
|
|
|
| 4 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 5 |
|
| 6 |
# Load the model and tokenizer
|
| 7 |
+
# tokenizer = AutoTokenizer.from_pretrained("ikoghoemmanuell/finetuned_sentiment_modell")
|
| 8 |
+
# model = AutoModelForSequenceClassification.from_pretrained("ikoghoemmanuell/finetuned_sentiment_modell")
|
| 9 |
+
tokenizer = AutoTokenizer.from_pretrained("jabojustin/finetuned_sentiment_modell")
|
| 10 |
+
model = AutoModelForSequenceClassification.from_pretrained("jabojustin/finetuned_sentiment_modell")
|
| 11 |
|
| 12 |
# Define the function for sentiment analysis
|
| 13 |
@st.cache_resource
|
|
|
|
| 38 |
|
| 39 |
|
| 40 |
# Add image
|
| 41 |
+
image = st.image("https://user-images.githubusercontent.com/115732734/271723351-3677394d-1cd3-4df8-8bec-616fa6bd3b2c.png", width=400)
|
| 42 |
|
| 43 |
# Get user input
|
| 44 |
text = st.text_input("Enter some text here:")
|