Spaces:
Runtime error
Runtime error
am230 commited on
Commit ·
60c033a
1
Parent(s): e6371b0
Initial commit pt.2
Browse files1234567import gradio as grdef greet(name):return "Hello " + name + "!!"iface = gr.Interface(fn=greet, inputs="text", outputs="text")iface.launch()1234567891011121314151617import gradio as grfrom transformers import pipelinemodel = 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.inputs.Textbox(lines=5, label="Input Text"),outputs=gr.Label(num_top_classes=2),title="Text Priority",).launch()
app.py+14-4