Rob Caamano commited on
Commit
390d16b
1 Parent(s): 3ce823a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,10 +11,10 @@ demo = """I'm so proud of myself for accomplishing my goals today. #motivation #
11
 
12
  text = st.text_area("Input text", demo, height=250)
13
 
14
- model_name = "distilbert-base-uncased-finetuned-sst-2-english"
15
 
16
- tokenizer = AutoTokenizer.from_pretrained(model_name)
17
- model = AutoModelForSequenceClassification.from_pretrained(model_name)
18
  clf = pipeline(
19
  "sentiment-analysis", model=model, tokenizer=tokenizer, return_all_scores=True
20
  )
 
11
 
12
  text = st.text_area("Input text", demo, height=250)
13
 
14
+ mod_name = "distilbert-base-uncased-finetuned-sst-2-english"
15
 
16
+ tokenizer = AutoTokenizer.from_pretrained(mod_name)
17
+ model = AutoModelForSequenceClassification.from_pretrained(mod_name)
18
  clf = pipeline(
19
  "sentiment-analysis", model=model, tokenizer=tokenizer, return_all_scores=True
20
  )