Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -547,7 +547,7 @@ with gr.Blocks(title="Cellemetry Agent", css=custom_css) as demo:
|
|
| 547 |
with gr.Column(scale=1, min_width=300):
|
| 548 |
chatbot = gr.Chatbot(
|
| 549 |
label="Agent Conversation",
|
| 550 |
-
height=
|
| 551 |
value=[{"role": "assistant", "content": "👋 Welcome to Cellemetry! Upload a microscopy image and describe what you'd like to analyze."}],
|
| 552 |
show_label=True
|
| 553 |
)
|
|
@@ -558,6 +558,19 @@ with gr.Blocks(title="Cellemetry Agent", css=custom_css) as demo:
|
|
| 558 |
submit_btn="Send"
|
| 559 |
)
|
| 560 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 561 |
# --- RIGHT COLUMN (Results) ---
|
| 562 |
with gr.Column(scale=2, elem_classes=["right-panel"]):
|
| 563 |
|
|
|
|
| 547 |
with gr.Column(scale=1, min_width=300):
|
| 548 |
chatbot = gr.Chatbot(
|
| 549 |
label="Agent Conversation",
|
| 550 |
+
height=400,
|
| 551 |
value=[{"role": "assistant", "content": "👋 Welcome to Cellemetry! Upload a microscopy image and describe what you'd like to analyze."}],
|
| 552 |
show_label=True
|
| 553 |
)
|
|
|
|
| 558 |
submit_btn="Send"
|
| 559 |
)
|
| 560 |
|
| 561 |
+
# --- NEW: Examples Component ---
|
| 562 |
+
# NOTE: Ensure you have an 'examples' folder with 'sample_1.png' and 'sample_2.png'
|
| 563 |
+
example_data = [
|
| 564 |
+
[{"text": "Analyze this image and describe the cell morphology.", "files": ["examples/sample_1.png"]}],
|
| 565 |
+
[{"text": "Segment the nuclei and calculate spatial distribution.", "files": ["examples/sample_2.png"]}],
|
| 566 |
+
]
|
| 567 |
+
|
| 568 |
+
gr.Examples(
|
| 569 |
+
examples=example_data,
|
| 570 |
+
inputs=chat_input,
|
| 571 |
+
label="Try an Example",
|
| 572 |
+
)
|
| 573 |
+
|
| 574 |
# --- RIGHT COLUMN (Results) ---
|
| 575 |
with gr.Column(scale=2, elem_classes=["right-panel"]):
|
| 576 |
|