Spaces:
Runtime error

text-priority / app.py
am230
Update app.py
93ad074
Raw History Blame Contribute Delete
408 Bytes
import gradio as gr
from transformers import pipeline
model = pipeline(
task="text-classification",
model="am230/text-priority",
)
def predict(text):
predictions = model(text)
return {p["label"]: p["score"] for p in predictions}
gr.Interface(
predict,
inputs=gr.Textbox(lines=5, label="Input Text"),
outputs=gr.Label(num_top_classes=2),
title="Text Priority",
).launch()