mo-456 commited on
Commit
9bba096
·
verified ·
1 Parent(s): 1c63317

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -70,11 +70,19 @@ def answer_question(question):
70
 
71
  # Gradio UI
72
  logger.info("Setting up Gradio UI...")
73
- with gr.Blocks() as demo:
 
 
 
 
 
74
  gr.Markdown("### 🤖 اسأل عن التنمية المستدامة أو الموازنة التشاركية")
75
  with gr.Row():
76
- inp = gr.Textbox(label="اكتب سؤالك هنا", placeholder="مثال: ما هي أهداف التنمية المستدامة؟", dir="rtl")
77
- out = gr.Textbox(label="الإجابة", dir="rtl")
 
 
 
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