Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
pipe = pipeline("sentiment-analysis") | |
def senti(sentiment): | |
return pipe(text) | |
if __name__ == "__main__": | |
iface = gr.Interface( | |
fn=senti, | |
inputs= gr.inputs.Textbox(lines=3, placeholder="Insert sentiment"), | |
description = 'Get Sentiment Negative/positive for the given input', | |
outputs="text" | |
) | |
iface.launch() |