Hello_world / app.py
othsueh's picture
Create app.py
8489be4 verified
raw
history blame contribute delete
206 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("sentiment-analysis")
def porn(text):
return pipe(text)
demo = gr.Interface(fn=porn, inputs="text", outputs="json")
demo.launch()