dylanplummer commited on
Commit
fa4355c
·
1 Parent(s): 141be9d

fix based on docs?

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -196,8 +196,9 @@ def get_heatmap(gene, locus1, locus2):
196
  return img
197
 
198
 
199
- def set_loop(gene, locus1, locus2, evt: gr.SelectData):
200
  print(evt)
 
201
  print(gene, locus1, locus2)
202
  idx = evt.index
203
  value = evt.value
@@ -359,7 +360,7 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
359
  fn=perturb, cache_examples=os.getenv('SYSTEM') == 'spaces')
360
  run_button.click(perturb, inputs, outputs=outputs)
361
  heatmap_button.click(get_heatmap, inputs, outputs=[out_heatmap])
362
- out_heatmap.select(set_loop, [in_locus, anchor1, anchor2], outputs=[anchor1, anchor2])
363
 
364
 
365
  if __name__ == "__main__":
 
196
  return img
197
 
198
 
199
+ def set_loop(img, gene, locus1, locus2, evt: gr.SelectData):
200
  print(evt)
201
+ print(evt.target)
202
  print(gene, locus1, locus2)
203
  idx = evt.index
204
  value = evt.value
 
360
  fn=perturb, cache_examples=os.getenv('SYSTEM') == 'spaces')
361
  run_button.click(perturb, inputs, outputs=outputs)
362
  heatmap_button.click(get_heatmap, inputs, outputs=[out_heatmap])
363
+ out_heatmap.select(set_loop, [out_heatmap, in_locus, anchor1, anchor2], outputs=[anchor1, anchor2])
364
 
365
 
366
  if __name__ == "__main__":