Update app.py
Browse files
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;
|
236 |
-
|
|
|
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.
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
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 |
|