File size: 434 Bytes
2765893
c635ea8
 
2765893
 
 
 
c635ea8
 
 
 
 
 
 
 
2765893
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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()