Spaces:
Sleeping
Sleeping
# Load model directly | |
import gradio as gr | |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline | |
tokenizer = AutoTokenizer.from_pretrained("j5ng/kcbert-formal-classifier") | |
model = AutoModelForSequenceClassification.from_pretrained("j5ng/kcbert-formal-classifier") | |
formal_classifier = pipeline(task="text-classification", model=model, tokenizer=tokenizer) | |
def greet(name): | |
return formal_classifier(name) | |
print("test") | |
iface = gr.Interface(fn=greet, inputs="text", outputs="text") | |
iface.launch() |