Spaces:
Runtime error
Runtime error
File size: 370 Bytes
46585ea |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
from transformers import pipeline
david = pipeline('sentiment-analysis')
def get_senti(input_text):
result = david(input_text)
return result[0]["label"]
iface=gr.Interface(fn=get_senti,
inputs="text",
outputs=['text'],
title="David's Sentiment Analysis" )
iface.launch(inline=False) |