doublelotus commited on
Commit
afd8926
·
1 Parent(s): 5722466

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- pipeline = pipeline("sentiment-analysis")
5
 
6
  def predict(text):
7
- return pipeline(text)
8
 
9
  demo gr.Interface(
10
  fn=predict,
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ classifier = pipeline("sentiment-analysis")
5
 
6
  def predict(text):
7
+ return classifier(text)
8
 
9
  demo gr.Interface(
10
  fn=predict,