Spaces:
Sleeping
Sleeping
import gradio as gr | |
from setfit import SetFitModel | |
def greet(text): | |
model = SetFitModel.from_pretrained("skylord/setfit-bge-small-v1.5-sst2-8-shot-talk2loop") # Load from the Hugging Face Hub | |
preds = model.predict([text]) | |
return "Tag: " + preds | |
iface = gr.Interface(fn=greet, inputs="text", outputs="text") | |
iface.launch() |