test / app.py
rayanAdeeb's picture
Update app.py
2b6660c verified
raw
history blame contribute delete
344 Bytes
import gradio as gr
# Use a pipeline as a high-level helper
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="text", outputs="text")
demo.launch(debug=True)