HelloWorld / app.py
Jerimee's picture
Update app.py
d8fc4cb
raw history blame
No virus
389 Bytes
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()