test3 / app.py
Abduuu's picture
Update app.py
db4b82e verified
raw
history blame contribute delete
475 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=gr.Textbox([label="أدخل النص هنا"]),
outputs=gr.Textbox([label='النتائج']),
title = "تصتنيف المشاعر")
demo.launch(debug=True)