AjayPlus commited on
Commit
e2a2e8b
·
verified ·
1 Parent(s): d0b9ff1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -3,10 +3,8 @@ from transformers import pipeline
3
 
4
  classifier = pipeline("text-classification", model="AjayPlus/propaganda-detector-v2")
5
 
6
- def detect(text):
7
  return classifier(text)
8
 
9
- demo = gr.Interface(fn=detect, inputs="text", outputs="json")
10
-
11
- if __name__ == "__main__":
12
- demo.launch()
 
3
 
4
  classifier = pipeline("text-classification", model="AjayPlus/propaganda-detector-v2")
5
 
6
+ def analyze(text):
7
  return classifier(text)
8
 
9
+ iface = gr.Interface(fn=analyze, inputs="text", outputs="label")
10
+ iface.launch()