Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -207,10 +207,10 @@ def gradio_inference(dna_sequence, run_mapping):
|
|
| 207 |
context_output = f"β Mapping failed: {context['error']}"
|
| 208 |
elif "location" in context:
|
| 209 |
context_lines = [
|
| 210 |
-
f" Location:
|
| 211 |
-
f" Strand:
|
| 212 |
-
f" Coordinates:
|
| 213 |
-
f" Notes:
|
| 214 |
]
|
| 215 |
context_output = "\n".join(context_lines)
|
| 216 |
else:
|
|
@@ -255,15 +255,18 @@ with gr.Blocks(theme=gr.themes.Soft(), title="𧬠The Genomic Oracle π§¬") as
|
|
| 255 |
)
|
| 256 |
|
| 257 |
with gr.Row():
|
|
|
|
| 258 |
with gr.Column(scale=1):
|
| 259 |
-
dna_input = gr.Textbox(label="Enter DNA Sequence", placeholder="e.g., ATGCGATCGATCGATCG...", lines=
|
| 260 |
run_mapping_cb = gr.Checkbox(value=False, label="Query NCBI BLAST for spatial mapping (Takes 1β3 mins)")
|
| 261 |
-
|
|
|
|
| 262 |
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
|
|
|
| 267 |
with mapping_section:
|
| 268 |
context_output = gr.Textbox(label="Mapping Results", lines=5, placeholder="Results will appear here...")
|
| 269 |
|
|
|
|
| 207 |
context_output = f"β Mapping failed: {context['error']}"
|
| 208 |
elif "location" in context:
|
| 209 |
context_lines = [
|
| 210 |
+
f" Location: {context['location']}",
|
| 211 |
+
f" Strand: {context['strand']}",
|
| 212 |
+
f" Coordinates: {context['start']:,} β {context['end']:,}",
|
| 213 |
+
f" Notes: {context['metadata']}"
|
| 214 |
]
|
| 215 |
context_output = "\n".join(context_lines)
|
| 216 |
else:
|
|
|
|
| 255 |
)
|
| 256 |
|
| 257 |
with gr.Row():
|
| 258 |
+
# π¨ Both columns are now scale=1, giving you a perfect 50/50 split!
|
| 259 |
with gr.Column(scale=1):
|
| 260 |
+
dna_input = gr.Textbox(label="Enter DNA Sequence", placeholder="e.g., ATGCGATCGATCGATCG...", lines=10)
|
| 261 |
run_mapping_cb = gr.Checkbox(value=False, label="Query NCBI BLAST for spatial mapping (Takes 1β3 mins)")
|
| 262 |
+
# π¨ Changed variant="primary" to variant="stop" for a striking red button
|
| 263 |
+
submit_btn = gr.Button("π Initialize Deep Scan", variant="stop")
|
| 264 |
|
| 265 |
+
# π¨ Changed from scale=2 to scale=1
|
| 266 |
+
with gr.Column(scale=1):
|
| 267 |
+
output_summary = gr.Textbox(label=" Classification Summary", lines=4)
|
| 268 |
+
stats_panel = gr.Textbox(label=" Internal Pipeline Statistics", lines=4)
|
| 269 |
+
mapping_section = gr.Accordion(" Genomic Context (BLAST/Ensembl)", open=False)
|
| 270 |
with mapping_section:
|
| 271 |
context_output = gr.Textbox(label="Mapping Results", lines=5, placeholder="Results will appear here...")
|
| 272 |
|