rivapereira123 commited on
Commit
4c1c4a5
·
verified ·
1 Parent(s): eddd27f

Update ui/components.py

Browse files
Files changed (1) hide show
  1. ui/components.py +11 -11
ui/components.py CHANGED
@@ -152,13 +152,13 @@ def create_header_section(language="English"):
152
  return gr.HTML("""
153
  <div class="header-section">
154
  <h1 style="margin: 0; font-size: 2.5em; font-weight: 700;">
155
- 🏥 Optimized Gaza First Aid Assistant
156
  </h1>
157
  <h2 style="margin: 10px 0 0 0; font-size: 1.2em; font-weight: 400; opacity: 0.9;">
158
- Powered by Pre-computed FAISS Index & 768-dim Embeddings
159
  </h2>
160
  <p style="margin: 15px 0 0 0; font-size: 1em; opacity: 0.8;">
161
- Lightning-fast medical guidance using pre-processed knowledge base
162
  </p>
163
  </div>
164
  """)
@@ -167,22 +167,22 @@ def create_query_input_section(language="English"):
167
  from core.utils.translations import translations
168
  t = translations.get(language, translations["English"])
169
  with gr.Group(elem_classes=["query-container"]):
170
- gr.Markdown("### 🩺 Medical Query Input")
171
  query_input = gr.Textbox(
172
  label="Describe your medical situation",
173
- placeholder="Enter your first aid question or describe the medical emergency...",
174
  lines=4
175
  )
176
 
177
  with gr.Row():
178
  submit_btn = gr.Button(
179
- "🔍 Get Medical Guidance",
180
  variant="primary",
181
  elem_classes=["submit-btn"],
182
  scale=3
183
  )
184
  clear_btn = gr.Button(
185
- "🗑️ Clear",
186
  variant="secondary",
187
  scale=1
188
  )
@@ -192,13 +192,13 @@ def create_response_output_section(language="English"):
192
  from core.utils.translations import translations
193
  t = translations.get(language, translations["English"])
194
  with gr.Group(elem_classes=["response-container"]):
195
- gr.Markdown("### 🩹 Medical Guidance Response")
196
- response_output = gr.Textbox(label="AI Medical Guidance", lines=15, interactive=False, placeholder="Your medical guidance will appear here...")
197
 
198
  with gr.Row():
199
  with gr.Column(scale=1):
200
  metadata_output = gr.Textbox(
201
- label="📊 Response Metadata",
202
  lines=2,
203
  interactive=False,
204
  placeholder="Response metadata will appear here..."
@@ -206,7 +206,7 @@ def create_response_output_section(language="English"):
206
 
207
  with gr.Column(scale=1):
208
  status_output = gr.Textbox(
209
- label="🛡️ Safety Status",
210
  lines=2,
211
  interactive=False,
212
  placeholder="Safety validation status will appear here..."
 
152
  return gr.HTML("""
153
  <div class="header-section">
154
  <h1 style="margin: 0; font-size: 2.5em; font-weight: 700;">
155
+ {t['header_title']}
156
  </h1>
157
  <h2 style="margin: 10px 0 0 0; font-size: 1.2em; font-weight: 400; opacity: 0.9;">
158
+ {t['header_subtitle']}
159
  </h2>
160
  <p style="margin: 15px 0 0 0; font-size: 1em; opacity: 0.8;">
161
+ {t['header_description']}
162
  </p>
163
  </div>
164
  """)
 
167
  from core.utils.translations import translations
168
  t = translations.get(language, translations["English"])
169
  with gr.Group(elem_classes=["query-container"]):
170
+ gr.Markdown(t["query_heading"])
171
  query_input = gr.Textbox(
172
  label="Describe your medical situation",
173
+ placeholder=t["query_placeholder"],
174
  lines=4
175
  )
176
 
177
  with gr.Row():
178
  submit_btn = gr.Button(
179
+ t["submit_btn"],
180
  variant="primary",
181
  elem_classes=["submit-btn"],
182
  scale=3
183
  )
184
  clear_btn = gr.Button(
185
+ t["clear_btn"],
186
  variant="secondary",
187
  scale=1
188
  )
 
192
  from core.utils.translations import translations
193
  t = translations.get(language, translations["English"])
194
  with gr.Group(elem_classes=["response-container"]):
195
+ gr.Markdown(t["response_heading"])
196
+ response_output = gr.Textbox(label=t["response_label"], lines=15, interactive=False, placeholder="Your medical guidance will appear here...")
197
 
198
  with gr.Row():
199
  with gr.Column(scale=1):
200
  metadata_output = gr.Textbox(
201
+ label=t["metadata_label"],
202
  lines=2,
203
  interactive=False,
204
  placeholder="Response metadata will appear here..."
 
206
 
207
  with gr.Column(scale=1):
208
  status_output = gr.Textbox(
209
+ label=t["safety_label"],
210
  lines=2,
211
  interactive=False,
212
  placeholder="Safety validation status will appear here..."