import gradio as gr | |
import torch | |
from nextus_regressor_class import * | |
model = NextUsRegressor() | |
model.load_state_dict(torch.load("./nextus_regressor1012.pt")) | |
model.eval() | |
gr.Interface(fn=model, | |
inputs=gr.Textbox(label="기사", lines=30, placeholder="기사를 입력하세요"), | |
outputs=gr.Number(label="Slant Score")).launch() |