STACC / app.py
aalkaswan's picture
Update app.py
c635ea8
raw
history blame
434 Bytes
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()