nlp_sentiment / app.py
amaldevc's picture
Update app.py
573bfdb verified
raw
history blame
256 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline(task="sentiment-analysis", model="amaldevc/nlp_sentiment")
def predict(review):
pipe.predict(review)
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
iface.launch()