johnpaulbin commited on
Commit
082a05e
·
verified ·
1 Parent(s): 9990ca4

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 setfit import SetFitModel
3
+ model = SetFitModel.from_pretrained("johnpaulbin/toki-pona-classifier-v2")
4
+
5
+
6
+ def greet(name):
7
+ return model.predict([name])[0]
8
+
9
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
10
+ demo.launch()