Julien Simon commited on
Commit
dabfb10
1 Parent(s): 109bce5

Initial version

Browse files
Files changed (2) hide show
  1. app.py +10 -0
  2. requirements.txt +2 -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="juliensimon/distilbert-amazon-shoe-reviews")
5
+
6
+ def predict(review):
7
+ return classifier(review)
8
+
9
+ iface = gr.Interface(fn=predict, inputs="text", outputs="text")
10
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ torch
2
+ transformers