Spaces:
Build error
Build error
Update app.py
Browse files
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
|
| 7 |
return classifier(text)
|
| 8 |
|
| 9 |
-
|
| 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()
|
|
|
|
|
|