testt / app.py
nowaff's picture
Update app.py
7ff1d07 verified
raw
history blame
426 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("text-classification", model="CAMeL-Lab/bert-base-arabic-camelbert-mix-sentiment")
def analyze(text):
result = pipe(text)
return result
demo = gr.Interface(fn=analyze,
inputs=[inputs="text", label="input text here"],
outputs="text",
title = "sentiment")
demo.launch(debug=True)