Spaces:
Sleeping
Sleeping
| 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) | |