Spaces:
Runtime error
Runtime error
import gradio as gr | |
from setfit import SetFitModel | |
def greet(name): | |
return "Hello " + name + "!!" | |
model = SetFitModel.from_pretrained("aalkaswan/java-deprecation-classifier", | |
device='cpu', #Use this if you don't have a GPU | |
) | |
def classify(text): | |
return model(text) | |
iface = gr.Interface(fn=classify, inputs="text", outputs="text") | |
iface.launch() |