karimmohamed19 commited on
Commit
9ddbf53
·
1 Parent(s): ec2edc5
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ classifier = pipeline("text-classification", model="karimmohamed19/final")
5
+
6
+ def classify(text):
7
+ result = classifier(text)
8
+ return result[0]['label']
9
+
10
+ iface = gr.Interface(fn=classify, inputs="text", outputs="text")
11
+ iface.launch()