ahmedalrashedi commited on
Commit
b34102e
1 Parent(s): 8df1c7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -24,11 +24,11 @@
24
  import streamlit as st
25
  from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer
26
 
27
- # Load sentiment analysis model from Hugging Face
28
- model_name = "distilbert-base-uncased-finetuned-sst-2-english"
29
- model = AutoModelForSequenceClassification.from_pretrained(model_name)
30
- tokenizer = AutoTokenizer.from_pretrained(model_name)
31
- sentiment_analyzer = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
32
 
33
  # Streamlit UI
34
  st.title("Sentiment Analysis App")
 
24
  import streamlit as st
25
  from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer
26
 
27
+ # model_name = "distilbert-base-uncased-finetuned-sst-2-english"
28
+ # model = AutoModelForSequenceClassification.from_pretrained(model_name)
29
+ # tokenizer = AutoTokenizer.from_pretrained(model_name)
30
+ # , tokenizer=tokenizer
31
+ sentiment_analyzer = pipeline("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
32
 
33
  # Streamlit UI
34
  st.title("Sentiment Analysis App")