Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
3 |
|
4 |
-
|
5 |
-
|
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)
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
3 |
|
4 |
+
tokenizer = AutoTokenizer.from_pretrained("nlptown/bert-base-multilingual-uncased-sentiment")
|
5 |
+
model = AutoModelForSequenceClassification.from_pretrained("nlptown/bert-base-multilingual-uncased-sentiment")
|
|
|
6 |
|
7 |
# Create a sentiment analysis pipeline with the explicit tokenizer
|
8 |
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|