Spaces:
Runtime error
Runtime error
File size: 593 Bytes
2765893 e7692af c635ea8 2765893 ec5db44 0dbab37 ec5db44 fb9083d c635ea8 27f7e99 c635ea8 2765893 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
import os
from setfit import SetFitModel
def greet(name):
return "Hello " + name + "!!"
print('@@@@@@@@@@@@@@@@@@@@@@@@@@')
print(os.environ.get('sec_tok'))
print('@@@@@@@@@@@@@@@@@@@@@@@@@@@@')
model = SetFitModel.from_pretrained("AISE-TUDelft/java-ownership-classifier",
device='cpu', #Use this if you don't have a GPU
use_auth_token=os.environ.get('sec_tok'))
def classify(text):
return model(text)
iface = gr.Interface(fn=classify, inputs="text", outputs="text")
iface.launch() |