Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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()
|