Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipe
|
|
| 5 |
tokenizer = AutoTokenizer.from_pretrained("OatNapat/finetuned_yelp")
|
| 6 |
model = AutoModelForSequenceClassification.from_pretrained("OatNapat/finetuned_yelp")
|
| 7 |
|
| 8 |
-
# Create a sentiment analysis pipeline
|
| 9 |
-
nlp = pipeline("sentiment-analysis", model=model)
|
| 10 |
|
| 11 |
st.title("Sentiment Analysis App")
|
| 12 |
user_input = st.text_input("Enter a sentence for sentiment analysis:")
|
|
|
|
| 5 |
tokenizer = AutoTokenizer.from_pretrained("OatNapat/finetuned_yelp")
|
| 6 |
model = AutoModelForSequenceClassification.from_pretrained("OatNapat/finetuned_yelp")
|
| 7 |
|
| 8 |
+
# Create a sentiment analysis pipeline with the explicit tokenizer
|
| 9 |
+
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
| 10 |
|
| 11 |
st.title("Sentiment Analysis App")
|
| 12 |
user_input = st.text_input("Enter a sentence for sentiment analysis:")
|