multi-label / app.py
winain7788's picture
Change to sentiment analysis
08831e4
raw
history blame
232 Bytes
import gradio as gr
from transformers_js_py import pipeline
pipe = pipeline('sentiment-analysis')
async def process(text):
return await pipe(text)
demo = gr.Interface(fn=process, inputs="text", outputs="json")
demo.launch()