ArxivClassifier / app.py
ubuntu
MVP
3091067
import gradio as gr
from load_model import load_model, predict_probs
from constants import title, description, examples
model = load_model()
demo = gr.Interface(
fn=lambda text: predict_probs(model, text),
inputs=gr.Textbox(label='News article title and description'),
outputs=gr.Label(num_top_classes=4),
examples=examples,
allow_flagging='never',
title=title,
description=description
)
demo.launch()