hasanmustafa0503 commited on
Commit
e8e9561
·
verified ·
1 Parent(s): c37647b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ classifier = pipeline("text-classification", model="hasanmustafa0503/SentimentModel")
5
+
6
+ def predict(text):
7
+ return classifier(text)
8
+
9
+ iface = gr.Interface(fn=predict, inputs="text", outputs="json")
10
+ iface.launch()