sentiment / app.py
enio's picture
Create new file
a4141e2
raw
history blame
299 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("sentiment", model="enio/Sentiment_BERT")
def predict(text):
return pipe(text)[0]["sentiment_text"]
iface = gr.Interface(
fn=predict,
inputs='text',
outputs='text',
examples=[["This is Awesome!"]]
)
iface.launch()