aneesqumar commited on
Commit
5dd0da0
·
verified ·
1 Parent(s): 93a870a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -28
app.py CHANGED
@@ -286,7 +286,7 @@ def generate_pdf(*inputs):
286
  # INTERFACE
287
  # ===============================
288
  # ===============================
289
- # PREMIUM MEDICAL INTERFACE
290
  # ===============================
291
  with gr.Blocks(
292
  theme=gr.themes.Soft(),
@@ -295,6 +295,17 @@ with gr.Blocks(
295
  background: linear-gradient(135deg, #e3f2fd, #f4f9ff);
296
  }
297
 
 
 
 
 
 
 
 
 
 
 
 
298
  .gr-button {
299
  border-radius: 10px !important;
300
  font-weight: 600 !important;
@@ -302,38 +313,15 @@ with gr.Blocks(
302
  font-size: 15px !important;
303
  }
304
 
305
- button:contains("Basic Risk Assessment") {
306
- background-color: #1565c0 !important;
307
- color: #15a1c0 !important;
308
- }
309
-
310
- button:contains("Detailed Report & Recommendations") {
311
- background-color: #00838f !important;
312
- color: blue !important;
313
- }
314
-
315
- button:contains("Generate PDF Report") {
316
- background-color: #2e7d32 !important;
317
- color: blue !important;
318
- }
319
-
320
  .gr-textbox, .gr-number, .gr-dropdown {
321
  border-radius: 8px !important;
322
  }
323
 
324
- .header-card {
325
- background: white;
326
- padding: 25px;
327
- border-radius: 15px;
328
- box-shadow: 0 4px 15px rgba(0,0,0,0.08);
329
- text-align: center;
330
- }
331
-
332
  .footer-team {
333
  background: #ffffff;
334
  padding: 15px;
335
  border-radius: 10px;
336
- margin-top: 15px;
337
  text-align: center;
338
  font-size: 14px;
339
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
@@ -341,15 +329,27 @@ with gr.Blocks(
341
  """
342
  ) as demo:
343
 
344
- gr.Markdown(f"""
345
- <div class="header-card">
346
- <img src="logo.png" width="140"><br><br>
 
 
 
347
  <h1 style="color:#0d47a1;">🏥 TyphoidGuard AI</h1>
348
  <h4 style="color:#37474f;">HEC Generative AI Hackathon – Pakistan</h4>
349
  <h4 style="color:#00695c;">Team Chinar AI (AJK)</h4>
350
  </div>
351
  """)
352
 
 
 
 
 
 
 
 
 
 
353
  with gr.Row():
354
  name = gr.Textbox(label="Patient Name")
355
  age = gr.Number(label="Age")
@@ -374,6 +374,7 @@ with gr.Blocks(
374
  label="Current Medication"
375
  )
376
 
 
377
  with gr.Row():
378
  predict_btn = gr.Button("Basic Risk Assessment")
379
  detailed_btn = gr.Button("Detailed Report & Recommendations")
@@ -396,6 +397,7 @@ with gr.Blocks(
396
  blood_bacteria,severity,medication],
397
  outputs=gr.File())
398
 
 
399
  gr.Markdown("""
400
  <div class="footer-team">
401
  <b>Team Chinar AI (AJK)</b><br>
 
286
  # INTERFACE
287
  # ===============================
288
  # ===============================
289
+ # PREMIUM MEDICAL INTERFACE (UPDATED)
290
  # ===============================
291
  with gr.Blocks(
292
  theme=gr.themes.Soft(),
 
295
  background: linear-gradient(135deg, #e3f2fd, #f4f9ff);
296
  }
297
 
298
+ .center-header {
299
+ text-align: center;
300
+ }
301
+
302
+ .instruction-text {
303
+ text-align: center;
304
+ font-size: 16px;
305
+ color: #37474f;
306
+ margin-bottom: 20px;
307
+ }
308
+
309
  .gr-button {
310
  border-radius: 10px !important;
311
  font-weight: 600 !important;
 
313
  font-size: 15px !important;
314
  }
315
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  .gr-textbox, .gr-number, .gr-dropdown {
317
  border-radius: 8px !important;
318
  }
319
 
 
 
 
 
 
 
 
 
320
  .footer-team {
321
  background: #ffffff;
322
  padding: 15px;
323
  border-radius: 10px;
324
+ margin-top: 20px;
325
  text-align: center;
326
  font-size: 14px;
327
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
 
329
  """
330
  ) as demo:
331
 
332
+ # ---- LOGO (Guaranteed to Display in HF) ----
333
+ gr.Image(LOGO_PATH, width=140, show_label=False, container=False)
334
+
335
+ # ---- CENTERED HEADER ----
336
+ gr.Markdown("""
337
+ <div class="center-header">
338
  <h1 style="color:#0d47a1;">🏥 TyphoidGuard AI</h1>
339
  <h4 style="color:#37474f;">HEC Generative AI Hackathon – Pakistan</h4>
340
  <h4 style="color:#00695c;">Team Chinar AI (AJK)</h4>
341
  </div>
342
  """)
343
 
344
+ # ---- INSTRUCTION TEXT ----
345
+ gr.Markdown("""
346
+ <div class="instruction-text">
347
+ Please enter the patient clinical values below to assess
348
+ the risk of typhoid treatment failure and receive AI-based recommendations.
349
+ </div>
350
+ """)
351
+
352
+ # ---- INPUT FIELDS ----
353
  with gr.Row():
354
  name = gr.Textbox(label="Patient Name")
355
  age = gr.Number(label="Age")
 
374
  label="Current Medication"
375
  )
376
 
377
+ # ---- BUTTONS ----
378
  with gr.Row():
379
  predict_btn = gr.Button("Basic Risk Assessment")
380
  detailed_btn = gr.Button("Detailed Report & Recommendations")
 
397
  blood_bacteria,severity,medication],
398
  outputs=gr.File())
399
 
400
+ # ---- TEAM FOOTER ----
401
  gr.Markdown("""
402
  <div class="footer-team">
403
  <b>Team Chinar AI (AJK)</b><br>