Spaces:
Sleeping
Sleeping
File size: 434 Bytes
a6a4045 5e5b20f e9ba688 5e5b20f e9ba688 5e5b20f |
1 2 3 4 5 6 7 8 9 10 |
import streamlit as st
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("OatNapat/finetuned_yelp")
model = AutoModelForSequenceClassification.from_pretrained("OatNapat/finetuned_yelp")
# Create a sentiment analysis pipeline with the explicit tokenizer
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|