Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,11 +70,19 @@ def answer_question(question):
|
|
| 70 |
|
| 71 |
# Gradio UI
|
| 72 |
logger.info("Setting up Gradio UI...")
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
gr.Markdown("### 🤖 اسأل عن التنمية المستدامة أو الموازنة التشاركية")
|
| 75 |
with gr.Row():
|
| 76 |
-
inp = gr.Textbox(
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
| 78 |
btn = gr.Button("إجابة")
|
| 79 |
btn.click(fn=answer_question, inputs=inp, outputs=out)
|
| 80 |
|
|
|
|
| 70 |
|
| 71 |
# Gradio UI
|
| 72 |
logger.info("Setting up Gradio UI...")
|
| 73 |
+
css = """
|
| 74 |
+
.rtl { text-align: right; direction: rtl; }
|
| 75 |
+
.rtl input, .rtl textarea { text-align: right; }
|
| 76 |
+
"""
|
| 77 |
+
|
| 78 |
+
with gr.Blocks(css=css) as demo:
|
| 79 |
gr.Markdown("### 🤖 اسأل عن التنمية المستدامة أو الموازنة التشاركية")
|
| 80 |
with gr.Row():
|
| 81 |
+
inp = gr.Textbox(
|
| 82 |
+
label="اكتب سؤالك هنا",
|
| 83 |
+
placeholder="مثال: ما هي أهداف التنمية المستدامة؟"
|
| 84 |
+
).style(rtl=True)
|
| 85 |
+
out = gr.Textbox(label="الإجابة").style(rtl=True)
|
| 86 |
btn = gr.Button("إجابة")
|
| 87 |
btn.click(fn=answer_question, inputs=inp, outputs=out)
|
| 88 |
|