aiqcamp commited on
Commit
535c8ca
·
verified ·
1 Parent(s): e989c1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -10
app.py CHANGED
@@ -427,19 +427,27 @@ def calculate_hero_stats(helix_bias, strand_bias, loop_bias, hydrophobic_score):
427
  }
428
  return stats
429
 
430
- ##toggle options
431
  def toggle_seq_input(choice):
432
- if choice == "protein length":
433
- return gr.update(visible=True, value=None), gr.update(visible=False, value=None)
434
- elif choice == "custom sequence":
435
- return gr.update(visible=False, value=None), gr.update(visible=True, value=None)
436
 
437
  def toggle_secondary_structure(choice):
438
- if choice == "sliders":
439
- return gr.update(visible=True, value=None),gr.update(visible=True, value=None),gr.update(visible=True, value=None),gr.update(visible=False, value=None)
440
- elif choice == "explicit":
441
- return gr.update(visible=False, value=None),gr.update(visible=False, value=None),gr.update(visible=False, value=None),gr.update(visible=True, value=None)
442
-
 
 
 
 
 
 
 
 
 
443
 
444
 
445
  def create_radar_chart(stats):
 
427
  }
428
  return stats
429
 
 
430
  def toggle_seq_input(choice):
431
+ if choice == "자동 설계":
432
+ return gr.update(visible=True), gr.update(visible=False)
433
+ else: # "직접 입력"
434
+ return gr.update(visible=False), gr.update(visible=True)
435
 
436
  def toggle_secondary_structure(choice):
437
+ if choice == "슬라이더로 설정":
438
+ return (
439
+ gr.update(visible=True), # helix_bias
440
+ gr.update(visible=True), # strand_bias
441
+ gr.update(visible=True), # loop_bias
442
+ gr.update(visible=False) # secondary_structure
443
+ )
444
+ else: # "직접 입력"
445
+ return (
446
+ gr.update(visible=False), # helix_bias
447
+ gr.update(visible=False), # strand_bias
448
+ gr.update(visible=False), # loop_bias
449
+ gr.update(visible=True) # secondary_structure
450
+ )
451
 
452
 
453
  def create_radar_chart(stats):