Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,12 +55,11 @@ demo = gr.Interface(
|
|
| 55 |
fn=analyze_text,
|
| 56 |
inputs=gr.Textbox(label="أدخل النص العربي هنا", lines=6),
|
| 57 |
outputs=gr.JSON(label="نتائج التحليل"),
|
| 58 |
-
api_name="predict",
|
| 59 |
title="Arabic Readability Analyzer",
|
| 60 |
description="أداة ذكية لتقييم مقروئية النصوص العربية باستخدام نموذج AraBERT."
|
| 61 |
)
|
| 62 |
|
| 63 |
-
# ✅ Launch safely (Gradio v4+)
|
| 64 |
if __name__ == "__main__":
|
| 65 |
demo.queue()
|
| 66 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 55 |
fn=analyze_text,
|
| 56 |
inputs=gr.Textbox(label="أدخل النص العربي هنا", lines=6),
|
| 57 |
outputs=gr.JSON(label="نتائج التحليل"),
|
| 58 |
+
api_name="predict", # <== هذا السطر يضيف الـendpoint المطلوب
|
| 59 |
title="Arabic Readability Analyzer",
|
| 60 |
description="أداة ذكية لتقييم مقروئية النصوص العربية باستخدام نموذج AraBERT."
|
| 61 |
)
|
| 62 |
|
|
|
|
| 63 |
if __name__ == "__main__":
|
| 64 |
demo.queue()
|
| 65 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|