Spaces:
Build error
Build error
| import streamlit as st | |
| import gradio as gr | |
| from transformers import pipeline | |
| pipe = pipeline ('sentiment-analysis') | |
| text = st.text_area('enter some text!') | |
| def predict_sentiment(text): | |
| result = pipe(text)[0] | |
| return result['label'] | |
| iface = gr.Interface(fn=predict_sentiment, inputs="text", outputs="text") | |
| iface.launch() | |