Ali2206 commited on
Commit
96bb421
Β·
verified Β·
1 Parent(s): 0787d32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -10
app.py CHANGED
@@ -232,8 +232,9 @@ def process_report(agent, file, messages: List[Dict[str, str]]) -> Tuple[List[Di
232
  def create_ui(agent):
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;
@@ -246,23 +247,25 @@ def create_ui(agent):
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
 
 
232
  def create_ui(agent):
233
  with gr.Blocks(css="""
234
  html, body, .gradio-container {
235
+ background: #0e1621;
236
+ color: #e0e0e0;
237
+ padding: 16px;
238
  }
239
  button.svelte-1ipelgc {
240
  background: linear-gradient(to right, #1e88e5, #0d47a1) !important;
 
247
  button.svelte-1ipelgc:hover {
248
  background: linear-gradient(to right, #2196f3, #1565c0) !important;
249
  border: 1px solid #1565c0 !important;
 
250
  }
251
  .gr-column {
252
  align-items: center !important;
253
+ gap: 12px;
254
+ }
255
+ .gr-file, .gr-button {
256
+ width: 100% !important;
257
+ max-width: 400px;
258
  }
259
  """) as demo:
260
  gr.Markdown("""
261
  <h2 style="text-align:center;">πŸ“„ CPS: Clinical Patient Support System</h2>
262
  <p style="text-align:center;">Analyze and summarize unstructured medical files using AI (optimized for A100 GPU).</p>
263
  """)
264
+ with gr.Column():
265
+ chatbot = gr.Chatbot(label="🧠 CPS Assistant", height=480, type="messages") # Reduced height
266
+ upload = gr.File(label="πŸ“‚ Upload Medical File", file_types=[".xlsx", ".csv", ".pdf"])
267
+ analyze = gr.Button("🧠 Analyze")
268
+ download = gr.File(label="πŸ“₯ Download Report", visible=False, interactive=False)
 
 
269
 
270
  state = gr.State(value=[])
271