Spaces:
Sleeping
Sleeping
File size: 404 Bytes
eafc741 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import gradio as gr
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="77abib/sarcasm"
)
def predict(text):
result = classifier(text)
return result
demo = gr.Interface(
fn=predict,
inputs=gr.Textbox(
placeholder="اكتب جملة بالعربية..."
),
outputs="json",
title="Arabic Sarcasm Detector"
)
demo.launch() |