POS_NEG / app.py
nabeo's picture
Rename source.py to app.py
1364e55
raw
history blame
460 Bytes
import gradio as gr
from transformers import pipeline
analyzer = pipeline("sentiment-analysis")
def greet(name):
#return "Hello " + name
return (analyzer(name))
# We instantiate the Textbox class
textbox = gr.Textbox(label="Please fill in something words:",placeholder="happy", lines=2)
#textbox = gr.Textbox(label="Type your name here:", placeholder="John Doe", lines=2)
gr.Interface(fn=greet, inputs=textbox, outputs="text").launch(share=True)