chrismay commited on
Commit
40cf21c
·
verified ·
1 Parent(s): 6402ee3

minor changes

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,14 +6,14 @@ st.header("Sentiment-demo-app")
6
  st.subheader("Please be patient and wait up to a minute until the demo app is loaded.")
7
  st.caption("This is a very simple demo application for a zero-shot classification pipeline to classify positive, neutral, or negative sentiment for a short text. Enter your text in the box below and press CTRl+ENTER to run the model.")
8
 
9
- classifier = pipeline("text-classification", model='tabularisai/multilingual-sentiment-analysis') #"zero-shot-classification" model='facebook/bart-large-mnli')
10
 
11
  text = st.text_area('Enter text here!')
12
  #candidate_labels = ['Positive', 'Neutral', 'Negative']
13
  result = pipe(texts)
14
 
15
  if text:
16
- out = classifier(text, result)
17
  st.json(out)
18
  del out
19
  gc.collect()
 
6
  st.subheader("Please be patient and wait up to a minute until the demo app is loaded.")
7
  st.caption("This is a very simple demo application for a zero-shot classification pipeline to classify positive, neutral, or negative sentiment for a short text. Enter your text in the box below and press CTRl+ENTER to run the model.")
8
 
9
+ pipe = pipeline("text-classification", model='tabularisai/multilingual-sentiment-analysis') #"zero-shot-classification" model='facebook/bart-large-mnli')
10
 
11
  text = st.text_area('Enter text here!')
12
  #candidate_labels = ['Positive', 'Neutral', 'Negative']
13
  result = pipe(texts)
14
 
15
  if text:
16
+ out = pipe(text, result)
17
  st.json(out)
18
  del out
19
  gc.collect()