Ali2206 commited on
Commit
0787d32
·
verified ·
1 Parent(s): f10bfab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -7
app.py CHANGED
@@ -233,28 +233,36 @@ def create_ui(agent):
233
  with gr.Blocks(css="""
234
  html, body, .gradio-container {
235
  background: #0e1621; color: #e0e0e0;
 
236
  }
237
  button.svelte-1ipelgc {
238
  background: linear-gradient(to right, #1e88e5, #0d47a1) !important;
239
  border: 1px solid #0d47a1 !important;
240
  color: white !important;
241
  font-weight: bold !important;
 
 
242
  }
243
  button.svelte-1ipelgc:hover {
244
  background: linear-gradient(to right, #2196f3, #1565c0) !important;
245
  border: 1px solid #1565c0 !important;
246
  color: white !important;
247
  }
 
 
 
248
  """) as demo:
249
  gr.Markdown("""
250
- <h2>📄 CPS: Clinical Patient Support System</h2>
251
- <p>Analyze and summarize unstructured medical files using AI (optimized for A100 GPU).</p>
252
  """)
253
- with gr.Column():
254
- chatbot = gr.Chatbot(label="CPS Assistant", height=700, type="messages")
255
- upload = gr.File(label="Upload Medical File", file_types=[".xlsx", ".csv", ".pdf"])
256
- analyze = gr.Button("🧠 Analyze")
257
- download = gr.File(label="Download Report", visible=False, interactive=False)
 
 
258
 
259
  state = gr.State(value=[])
260
 
@@ -263,6 +271,7 @@ def create_ui(agent):
263
  return messages, gr.update(visible=bool(report_path), value=report_path), messages
264
 
265
  analyze.click(fn=handle_analysis, inputs=[upload, state], outputs=[chatbot, download, state])
 
266
  return demo
267
 
268
  # === Main ===
 
233
  with gr.Blocks(css="""
234
  html, body, .gradio-container {
235
  background: #0e1621; color: #e0e0e0;
236
+ padding: 10px;
237
  }
238
  button.svelte-1ipelgc {
239
  background: linear-gradient(to right, #1e88e5, #0d47a1) !important;
240
  border: 1px solid #0d47a1 !important;
241
  color: white !important;
242
  font-weight: bold !important;
243
+ padding: 10px 20px !important;
244
+ border-radius: 8px !important;
245
  }
246
  button.svelte-1ipelgc:hover {
247
  background: linear-gradient(to right, #2196f3, #1565c0) !important;
248
  border: 1px solid #1565c0 !important;
249
  color: white !important;
250
  }
251
+ .gr-column {
252
+ align-items: center !important;
253
+ }
254
  """) as demo:
255
  gr.Markdown("""
256
+ <h2 style="text-align:center;">📄 CPS: Clinical Patient Support System</h2>
257
+ <p style="text-align:center;">Analyze and summarize unstructured medical files using AI (optimized for A100 GPU).</p>
258
  """)
259
+ with gr.Row():
260
+ with gr.Column(scale=2):
261
+ chatbot = gr.Chatbot(label="🧠 CPS Assistant", height=500, type="messages")
262
+ with gr.Column(scale=1, min_width=300):
263
+ upload = gr.File(label="📂 Upload Medical File", file_types=[".xlsx", ".csv", ".pdf"])
264
+ analyze = gr.Button("🧠 Analyze")
265
+ download = gr.File(label="📥 Download Report", visible=False, interactive=False)
266
 
267
  state = gr.State(value=[])
268
 
 
271
  return messages, gr.update(visible=bool(report_path), value=report_path), messages
272
 
273
  analyze.click(fn=handle_analysis, inputs=[upload, state], outputs=[chatbot, download, state])
274
+
275
  return demo
276
 
277
  # === Main ===