johnpaulbin's picture
Create app.py
082a05e verified
raw
history blame contribute delete
257 Bytes
import gradio as gr
from setfit import SetFitModel
model = SetFitModel.from_pretrained("johnpaulbin/toki-pona-classifier-v2")
def greet(name):
return model.predict([name])[0]
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()