Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,9 +11,17 @@ def detect_dialect(text):
|
|
| 11 |
result = dialect(text)[0]
|
| 12 |
return f"{result['label']} ({round(result['score'], 3)})"
|
| 13 |
|
| 14 |
-
iface = gr.Interface(
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
result = dialect(text)[0]
|
| 12 |
return f"{result['label']} ({round(result['score'], 3)})"
|
| 13 |
|
| 14 |
+
iface = gr.Interface(
|
| 15 |
+
fn=detect_dialect,
|
| 16 |
+
inputs=gr.Textbox(label="Arabic text"),
|
| 17 |
+
outputs="text",
|
| 18 |
+
title="Arabic Dialect Detector",
|
| 19 |
+
)
|
| 20 |
|
| 21 |
+
# ✅ Launch with proper API + no SSR + queue enabled
|
| 22 |
+
iface.launch(
|
| 23 |
+
server_name="0.0.0.0",
|
| 24 |
+
enable_queue=True,
|
| 25 |
+
share=True,
|
| 26 |
+
ssr_mode=False
|
| 27 |
+
)
|