Geonomic commited on
Commit
e08e331
Β·
verified Β·
1 Parent(s): 22aac61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -10
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: {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,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=12)
260
  run_mapping_cb = gr.Checkbox(value=False, label="Query NCBI BLAST for spatial mapping (Takes 1–3 mins)")
261
- submit_btn = gr.Button("πŸš€ Initialize Deep Scan", variant="primary")
 
262
 
263
- with gr.Column(scale=2):
264
- output_summary = gr.Textbox(label="Classification Summary", lines=4)
265
- stats_panel = gr.Textbox(label="Internal Pipeline Statistics", lines=4)
266
- mapping_section = gr.Accordion("🌐 Genomic Context (BLAST/Ensembl)", open=False)
 
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