Spaces:
Sleeping
Sleeping
| 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() |