aiqcamp commited on
Commit
380523e
ยท
verified ยท
1 Parent(s): 0cfbd4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +168 -79
app.py CHANGED
@@ -544,104 +544,190 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
544
  gr.Markdown("# ๐Ÿฆธโ€โ™‚๏ธ ์Šˆํผํžˆ์–ด๋กœ ๋‹จ๋ฐฑ์งˆ ๋งŒ๋“ค๊ธฐ")
545
 
546
  with gr.Tabs():
547
- with gr.TabItem("ํžˆ์–ด๋กœ ๋””์ž์ธ"):
 
 
 
 
 
548
  # ํžˆ์–ด๋กœ ๊ธฐ๋ณธ ์ •๋ณด
549
- hero_name = gr.Textbox(label="ํžˆ์–ด๋กœ ์ด๋ฆ„", placeholder="๋‹น์‹ ์˜ ํžˆ์–ด๋กœ ์ด๋ฆ„์„ ์ง€์–ด์ฃผ์„ธ์š”!")
 
 
 
 
550
 
551
  # ๋Šฅ๋ ฅ์น˜ ์„ค์ •
552
  gr.Markdown("### ๐Ÿ’ช ํžˆ์–ด๋กœ ๋Šฅ๋ ฅ์น˜ ์„ค์ •")
553
  with gr.Row():
554
- strength = gr.Slider(minimum=0.0, maximum=0.05, label="๐Ÿ’ช ์ดˆ๊ฐ•๋ ฅ(๊ทผ๋ ฅ)", value=0.02)
555
- flexibility = gr.Slider(minimum=0.0, maximum=0.05, label="๐Ÿคธโ€โ™‚๏ธ ์œ ์—ฐ์„ฑ", value=0.02)
 
 
 
 
 
 
 
 
 
 
556
 
557
  with gr.Row():
558
- speed = gr.Slider(minimum=0.0, maximum=0.20, label="โšก ์Šคํ”ผ๋“œ", value=0.1)
559
- defense = gr.Slider(minimum=-10, maximum=10, label="๐Ÿ›ก๏ธ ๋ฐฉ์–ด๋ ฅ", value=0)
 
 
 
 
 
 
 
 
 
 
560
 
561
  # ํžˆ์–ด๋กœ ํฌ๊ธฐ ์„ค์ •
562
- hero_size = gr.Slider(minimum=50, maximum=200, label="ํžˆ์–ด๋กœ ํฌ๊ธฐ", value=100)
 
 
 
 
 
563
 
564
  # ํŠน์ˆ˜ ๋Šฅ๋ ฅ ์„ค์ •
565
  with gr.Accordion("๐ŸŒŸ ํŠน์ˆ˜ ๋Šฅ๋ ฅ", open=False):
 
 
 
 
 
 
566
  special_ability = gr.CheckboxGroup(
567
  choices=["์ž๊ฐ€ ํšŒ๋ณต", "์›๊ฑฐ๋ฆฌ ๊ณต๊ฒฉ", "๋ฐฉ์–ด๋ง‰ ์ƒ์„ฑ"],
568
  label="ํŠน์ˆ˜ ๋Šฅ๋ ฅ ์„ ํƒ"
569
  )
570
 
571
  # ์ƒ์„ฑ ๋ฒ„ํŠผ
572
- create_btn = gr.Button("ํžˆ์–ด๋กœ ์ƒ์„ฑ!", variant="primary")
573
-
574
- with gr.TabItem("Inputs"):
575
- gr.Markdown("""## INPUTS""")
576
- gr.Markdown("""#### Start Sequence
577
- Specify the protein length for complete unconditional generation, or scaffold a motif (or your name) using the custom sequence input""")
578
- seq_opt = gr.Radio(["protein length","custom sequence"], label="How would you like to specify the starting sequence?", value='protein length')
579
 
580
- sequence = gr.Textbox(label="custom sequence", lines=1, placeholder='AMINO ACIDS: A,C,D,E,F,G,H,I,K,L,M,N,P,Q,R,S,T,V,W,Y\n MASK TOKEN: X', visible=False)
581
- seq_len = gr.Slider(minimum=5.0, maximum=250.0, label="protein length", value=100, visible=True)
 
 
 
582
 
583
- seq_opt.change(fn=toggle_seq_input,
584
- inputs=[seq_opt],
585
- outputs=[seq_len, sequence],
586
- queue=False)
587
-
588
- gr.Markdown("""### Optional Parameters""")
589
- with gr.Accordion(label='Secondary Structure',open=True):
590
- gr.Markdown("""Try changing the sliders or inputing explicit secondary structure conditioning for each residue""")
591
- sec_str_opt = gr.Radio(["sliders","explicit"], label="How would you like to specify secondary structure?", value='sliders')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
592
 
593
- secondary_structure = gr.Textbox(label="secondary structure", lines=1, placeholder='HELIX = H STRAND = S LOOP = L MASK = X(must be the same length as input sequence)', visible=False)
 
 
 
 
 
594
 
595
  with gr.Column():
596
- helix_bias = gr.Slider(minimum=0.0, maximum=0.05, label="helix bias", visible=True)
597
- strand_bias = gr.Slider(minimum=0.0, maximum=0.05, label="strand bias", visible=True)
598
- loop_bias = gr.Slider(minimum=0.0, maximum=0.20, label="loop bias", visible=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
599
 
600
- sec_str_opt.change(fn=toggle_secondary_structure,
601
- inputs=[sec_str_opt],
602
- outputs=[helix_bias,strand_bias,loop_bias,secondary_structure],
603
- queue=False)
604
-
605
- with gr.Accordion(label='Amino Acid Compositional Bias',open=False):
606
- gr.Markdown("""Bias sequence composition for particular amino acids by specifying the one letter code followed by the fraction to bias. This can be input as a list for example: W0.2,E0.1""")
607
- with gr.Row():
608
- aa_bias = gr.Textbox(label="aa bias", lines=1, placeholder='specify one letter AA and fraction to bias, for example W0.1 or M0.1,K0.1' )
609
- aa_bias_potential = gr.Textbox(label="aa bias scale", lines=1, placeholder='AA Bias potential scale (recomended range 1.0-5.0)')
610
-
611
- with gr.Accordion(label='Hydrophobic Bias',open=False):
612
- gr.Markdown("""Bias for or against hydrophobic composition, to get more soluble proteins, bias away with a negative target score (ex. -5)""")
613
- with gr.Row():
614
- hydrophobic_target_score = gr.Textbox(label="hydrophobic score", lines=1, placeholder='hydrophobic score to target (negative score is good for solublility)')
615
- hydrophobic_potential = gr.Textbox(label="hydrophobic potential scale", lines=1, placeholder='hydrophobic potential scale (recomended range 1.0-2.0)')
616
 
617
- with gr.Accordion(label='Diffusion Params',open=False):
618
- gr.Markdown("""Increasing T to more steps can be helpful for harder design challenges, sampling from different distributions can change the sequence and structural composition""")
619
- with gr.Row():
620
- num_steps = gr.Textbox(label="T", lines=1, placeholder='number of diffusion steps (25 or less will speed things up)')
621
- noise = gr.Dropdown(['normal','gmm2 [-1,1]','gmm3 [-1,0,1]'], label='noise type', value='normal')
622
-
623
- with gr.TabItem("Motif Selection"):
624
- gr.Markdown("""### Motif Selection Preview""")
625
- gr.Markdown('Contigs explained: to grab residues (seq and str) on a pdb chain you will provide the chain letter followed by a range of residues as indexed in the pdb file for example (A3-10) is the syntax to select residues 3-10 on chain A (the chain always needs to be specified). To add diffused residues to either side of this motif you can specify a range or discrete value without a chain letter infront. To add 15 residues before the motif and 20-30 residues (randomly sampled) after use the following syntax: 15,A3-10,20-30 commas are used to separate regions selected from the pdb and designed (diffused) resiudes which will be added. ')
626
- pdb_id_code = gr.Textbox(label="PDB ID", lines=1, placeholder='INPUT PDB ID TO FETCH (ex. 1DPX)', visible=True)
627
- contigs = gr.Textbox(label="contigs", lines=1, placeholder='specify contigs to grab particular residues from pdb ()', visible=True)
628
- gr.Markdown('Using the same contig syntax, seq or str of input motif residues can be masked, allowing the model to hold strucutre fixed and design sequence or vice-versa')
629
  with gr.Row():
630
- seq_mask = gr.Textbox(label='seq mask',lines=1,placeholder='input residues to mask sequence')
631
- str_mask = gr.Textbox(label='str mask',lines=1,placeholder='input residues to mask structure')
 
 
 
 
 
 
 
 
 
632
  preview_viewer = gr.HTML()
633
- rewrite_pdb = gr.File(label='PDB file')
634
- preview_btn = gr.Button("Preview Motif")
635
-
636
- with gr.TabItem("MSA to PSSM"):
637
- gr.Markdown("""### MSA to PSSM Generation""")
638
- gr.Markdown('input either an MSA or PSSM to guide the model toward generating samples within your family of interest')
 
 
 
639
  with gr.Row():
640
- fasta_msa = gr.File(label='MSA')
641
- input_pssm = gr.File(label='PSSM (.csv)')
642
- pssm = gr.File(label='Generated PSSM')
643
- pssm_view = gr.Plot(label='PSSM Viewer')
644
- pssm_gen_btn = gr.Button("Generate PSSM")
 
 
 
 
 
 
 
645
 
646
  with gr.Column():
647
  gr.Markdown("## ๐Ÿฆธโ€โ™‚๏ธ ํžˆ์–ด๋กœ ํ”„๋กœํ•„")
@@ -651,18 +737,21 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
651
 
652
  # ํžˆ์–ด๋กœ ์„ค๋ช…
653
  hero_description = gr.Textbox(label="ํžˆ์–ด๋กœ ํŠน์„ฑ", lines=3)
654
-
655
 
656
- gr.Markdown("""## OUTPUTS""")
657
- gr.Markdown("""#### Confidence score for generated structure at each timestep""")
658
- plddt_plot = gr.Plot(label='plddt at step t')
659
- gr.Markdown("""#### Output protein sequnece""")
660
- output_seq = gr.Textbox(label="sequence")
661
- gr.Markdown("""#### Download PDB file""")
662
- output_pdb = gr.File(label="PDB file")
663
- gr.Markdown("""#### Structure viewer""")
664
  output_viewer = gr.HTML()
665
 
 
 
 
 
666
  # ์ด๋ฒคํŠธ ์—ฐ๊ฒฐ
667
  preview_btn.click(get_motif_preview,[pdb_id_code, contigs],[preview_viewer, rewrite_pdb])
668
  pssm_gen_btn.click(get_pssm,[fasta_msa,input_pssm],[pssm_view, pssm])
 
544
  gr.Markdown("# ๐Ÿฆธโ€โ™‚๏ธ ์Šˆํผํžˆ์–ด๋กœ ๋‹จ๋ฐฑ์งˆ ๋งŒ๋“ค๊ธฐ")
545
 
546
  with gr.Tabs():
547
+ with gr.TabItem("๐Ÿฆธโ€โ™‚๏ธ ํžˆ์–ด๋กœ ๋””์ž์ธ"):
548
+ gr.Markdown("""
549
+ ### โœจ ๋‹น์‹ ๋งŒ์˜ ํŠน๋ณ„ํ•œ ํžˆ์–ด๋กœ๋ฅผ ๋งŒ๋“ค์–ด๋ณด์„ธ์š”!
550
+ ๊ฐ ๋Šฅ๋ ฅ์น˜๋ฅผ ์กฐ์ ˆํ•˜๋ฉด ํžˆ์–ด๋กœ์˜ DNA๊ฐ€ ์ž๋™์œผ๋กœ ์„ค๊ณ„๋ฉ๋‹ˆ๋‹ค.
551
+ """)
552
+
553
  # ํžˆ์–ด๋กœ ๊ธฐ๋ณธ ์ •๋ณด
554
+ hero_name = gr.Textbox(
555
+ label="ํžˆ์–ด๋กœ ์ด๋ฆ„",
556
+ placeholder="๋‹น์‹ ์˜ ํžˆ์–ด๋กœ ์ด๋ฆ„์„ ์ง€์–ด์ฃผ์„ธ์š”!",
557
+ info="ํžˆ์–ด๋กœ์˜ ์ •์ฒด์„ฑ์„ ๋‚˜ํƒ€๋‚ด๋Š” ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜์„ธ์š”"
558
+ )
559
 
560
  # ๋Šฅ๋ ฅ์น˜ ์„ค์ •
561
  gr.Markdown("### ๐Ÿ’ช ํžˆ์–ด๋กœ ๋Šฅ๋ ฅ์น˜ ์„ค์ •")
562
  with gr.Row():
563
+ strength = gr.Slider(
564
+ minimum=0.0, maximum=0.05,
565
+ label="๐Ÿ’ช ์ดˆ๊ฐ•๋ ฅ(๊ทผ๋ ฅ)",
566
+ value=0.02,
567
+ info="๋‹จ๋‹จํ•œ ๋ฒ ํƒ€์‹œํŠธ ๊ตฌ์กฐ๋กœ ๊ฐ•๋ ฅํ•œ ํž˜์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค"
568
+ )
569
+ flexibility = gr.Slider(
570
+ minimum=0.0, maximum=0.05,
571
+ label="๐Ÿคธโ€โ™‚๏ธ ์œ ์—ฐ์„ฑ",
572
+ value=0.02,
573
+ info="๋‚˜์„ ํ˜• ์•ŒํŒŒํ—ฌ๋ฆญ์Šค ๊ตฌ์กฐ๋กœ ์œ ์—ฐํ•œ ์›€์ง์ž„์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค"
574
+ )
575
 
576
  with gr.Row():
577
+ speed = gr.Slider(
578
+ minimum=0.0, maximum=0.20,
579
+ label="โšก ์Šคํ”ผ๋“œ",
580
+ value=0.1,
581
+ info="๋ฃจํ”„ ๊ตฌ์กฐ๋กœ ๋น ๋ฅธ ์›€์ง์ž„์„ ๊ตฌํ˜„ํ•ฉ๋‹ˆ๋‹ค"
582
+ )
583
+ defense = gr.Slider(
584
+ minimum=-10, maximum=10,
585
+ label="๐Ÿ›ก๏ธ ๋ฐฉ์–ด๋ ฅ",
586
+ value=0,
587
+ info="์Œ์ˆ˜: ์ˆ˜์ค‘ ํ™œ๋™์— ํŠนํ™”, ์–‘์ˆ˜: ์ง€์ƒ ํ™œ๋™์— ํŠนํ™”"
588
+ )
589
 
590
  # ํžˆ์–ด๋กœ ํฌ๊ธฐ ์„ค์ •
591
+ hero_size = gr.Slider(
592
+ minimum=50, maximum=200,
593
+ label="๐Ÿ“ ํžˆ์–ด๋กœ ํฌ๊ธฐ",
594
+ value=100,
595
+ info="ํžˆ์–ด๋กœ์˜ ์ „์ฒด์ ์ธ ํฌ๊ธฐ๋ฅผ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค"
596
+ )
597
 
598
  # ํŠน์ˆ˜ ๋Šฅ๋ ฅ ์„ค์ •
599
  with gr.Accordion("๐ŸŒŸ ํŠน์ˆ˜ ๋Šฅ๋ ฅ", open=False):
600
+ gr.Markdown("""
601
+ ํŠน์ˆ˜ ๋Šฅ๋ ฅ์„ ์„ ํƒํ•˜๋ฉด ํžˆ์–ด๋กœ์˜ DNA์— ํŠน๋ณ„ํ•œ ๊ตฌ์กฐ๊ฐ€ ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.
602
+ - ์ž๊ฐ€ ํšŒ๋ณต: ๋‹จ๋ฐฑ์งˆ ๊ตฌ์กฐ ๋ณต๊ตฌ ๋Šฅ๋ ฅ ๊ฐ•ํ™”
603
+ - ์›๊ฑฐ๋ฆฌ ๊ณต๊ฒฉ: ํŠน์ˆ˜ํ•œ ๊ตฌ์กฐ์  ๋Œ์ถœ๋ถ€ ํ˜•์„ฑ
604
+ - ๋ฐฉ์–ด๋ง‰ ์ƒ์„ฑ: ์•ˆ์ •์ ์ธ ๋ณดํ˜ธ์ธต ๊ตฌ์กฐ ์ƒ์„ฑ
605
+ """)
606
  special_ability = gr.CheckboxGroup(
607
  choices=["์ž๊ฐ€ ํšŒ๋ณต", "์›๊ฑฐ๋ฆฌ ๊ณต๊ฒฉ", "๋ฐฉ์–ด๋ง‰ ์ƒ์„ฑ"],
608
  label="ํŠน์ˆ˜ ๋Šฅ๋ ฅ ์„ ํƒ"
609
  )
610
 
611
  # ์ƒ์„ฑ ๋ฒ„ํŠผ
612
+ create_btn = gr.Button("๐Ÿงฌ ํžˆ์–ด๋กœ ์ƒ์„ฑ!", variant="primary", scale=2)
 
 
 
 
 
 
613
 
614
+ with gr.TabItem("๐Ÿงฌ ํžˆ์–ด๋กœ DNA ์„ค๊ณ„"):
615
+ gr.Markdown("""
616
+ ### ๐Ÿงช ํžˆ์–ด๋กœ DNA ๊ณ ๊ธ‰ ์„ค์ •
617
+ ํžˆ์–ด๋กœ์˜ ์œ ์ „์ž ๊ตฌ์กฐ๋ฅผ ๋” ์„ธ๋ฐ€ํ•˜๊ฒŒ ์กฐ์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
618
+ """)
619
 
620
+ seq_opt = gr.Radio(
621
+ ["์ž๋™ ์„ค๊ณ„", "์ง์ ‘ ์ž…๋ ฅ"],
622
+ label="DNA ์„ค๊ณ„ ๋ฐฉ์‹",
623
+ value="์ž๋™ ์„ค๊ณ„"
624
+ )
625
+
626
+ sequence = gr.Textbox(
627
+ label="DNA ์‹œํ€€์Šค",
628
+ lines=1,
629
+ placeholder='์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์•„๋ฏธ๋…ธ์‚ฐ: A,C,D,E,F,G,H,I,K,L,M,N,P,Q,R,S,T,V,W,Y (X๋Š” ๋ฌด์ž‘์œ„)',
630
+ visible=False
631
+ )
632
+ seq_len = gr.Slider(
633
+ minimum=5.0, maximum=250.0,
634
+ label="DNA ๊ธธ์ด",
635
+ value=100,
636
+ visible=True
637
+ )
638
+
639
+ with gr.Accordion(label='๐Ÿฆด ๊ณจ๊ฒฉ ๊ตฌ์กฐ ์„ค์ •', open=True):
640
+ gr.Markdown("""
641
+ ํžˆ์–ด๋กœ์˜ ๊ธฐ๋ณธ ๊ณจ๊ฒฉ ๊ตฌ์กฐ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
642
+ - ๋‚˜์„ ํ˜• ๊ตฌ์กฐ: ์œ ์—ฐํ•˜๊ณ  ํƒ„๋ ฅ์žˆ๋Š” ์›€์ง์ž„
643
+ - ๋ณ‘ํ’ํ˜• ๊ตฌ์กฐ: ๋‹จ๋‹จํ•˜๊ณ  ๊ฐ•๋ ฅํ•œ ํž˜
644
+ - ๊ณ ๋ฆฌํ˜• ๊ตฌ์กฐ: ๋น ๋ฅด๊ณ  ๋ฏผ์ฒฉํ•œ ์›€์ง์ž„
645
+ """)
646
+ sec_str_opt = gr.Radio(
647
+ ["์Šฌ๋ผ์ด๋”๋กœ ์„ค์ •", "์ง์ ‘ ์ž…๋ ฅ"],
648
+ label="๊ณจ๊ฒฉ ๊ตฌ์กฐ ์„ค์ • ๋ฐฉ์‹",
649
+ value="์Šฌ๋ผ์ด๋”๋กœ ์„ค์ •"
650
+ )
651
 
652
+ secondary_structure = gr.Textbox(
653
+ label="๊ณจ๊ฒฉ ๊ตฌ์กฐ",
654
+ lines=1,
655
+ placeholder='H:๋‚˜์„ ํ˜•, S:๋ณ‘ํ’ํ˜•, L:๊ณ ๋ฆฌํ˜•, X:์ž๋™์„ค์ •',
656
+ visible=False
657
+ )
658
 
659
  with gr.Column():
660
+ helix_bias = gr.Slider(
661
+ minimum=0.0, maximum=0.05,
662
+ label="๋‚˜์„ ํ˜• ๊ตฌ์กฐ ๋น„์œจ",
663
+ visible=True
664
+ )
665
+ strand_bias = gr.Slider(
666
+ minimum=0.0, maximum=0.05,
667
+ label="๋ณ‘ํ’ํ˜• ๊ตฌ์กฐ ๋น„์œจ",
668
+ visible=True
669
+ )
670
+ loop_bias = gr.Slider(
671
+ minimum=0.0, maximum=0.20,
672
+ label="๊ณ ๋ฆฌํ˜• ๊ตฌ์กฐ ๋น„์œจ",
673
+ visible=True
674
+ )
675
+
676
+ with gr.TabItem("๐Ÿงช ํžˆ์–ด๋กœ ์œ ์ „์ž ๊ฐ•ํ™”"):
677
+ gr.Markdown("""
678
+ ### โšก ๊ธฐ์กด ํžˆ์–ด๋กœ์˜ DNA ํ™œ์šฉ
679
+ ๊ฐ•๋ ฅํ•œ ํžˆ์–ด๋กœ์˜ DNA ์ผ๋ถ€๋ฅผ ์ƒˆ๋กœ์šด ํžˆ์–ด๋กœ์—๊ฒŒ ์ด์‹ํ•ฉ๋‹ˆ๋‹ค.
680
+ """)
681
 
682
+ pdb_id_code = gr.Textbox(
683
+ label="ํžˆ์–ด๋กœ DNA ์ฝ”๋“œ",
684
+ lines=1,
685
+ placeholder='๊ธฐ์กด ํžˆ์–ด๋กœ์˜ DNA ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š” (์˜ˆ: 1DPX)',
686
+ info="๊ณต๊ฐœ๋œ ํžˆ์–ด๋กœ DNA ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์—์„œ ์ฝ”๋“œ๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค"
687
+ )
688
+
689
+ contigs = gr.Textbox(
690
+ label="์ด์‹ํ•  DNA ์˜์—ญ",
691
+ lines=1,
692
+ placeholder='์˜ˆ์‹œ: 15,A3-10,20-30',
693
+ info="์ด์‹ํ•˜๊ณ  ์‹ถ์€ DNA ์˜์—ญ์„ ์„ ํƒํ•˜๊ณ  ์ƒˆ๋กœ์šด DNA๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค"
694
+ )
 
 
 
695
 
 
 
 
 
 
 
 
 
 
 
 
 
696
  with gr.Row():
697
+ seq_mask = gr.Textbox(
698
+ label='๋Šฅ๋ ฅ ์žฌ์„ค๊ณ„',
699
+ lines=1,
700
+ placeholder='์„ ํƒํ•œ ์˜์—ญ์˜ ๋Šฅ๋ ฅ์„ ์ƒˆ๋กญ๊ฒŒ ๋””์ž์ธ'
701
+ )
702
+ str_mask = gr.Textbox(
703
+ label='๊ตฌ์กฐ ์žฌ์„ค๊ณ„',
704
+ lines=1,
705
+ placeholder='์„ ํƒํ•œ ์˜์—ญ์˜ ๊ตฌ์กฐ๋ฅผ ์ƒˆ๋กญ๊ฒŒ ๋””์ž์ธ'
706
+ )
707
+
708
  preview_viewer = gr.HTML()
709
+ rewrite_pdb = gr.File(label='ํžˆ์–ด๋กœ DNA ํŒŒ์ผ')
710
+ preview_btn = gr.Button("๐Ÿ” ๋ฏธ๋ฆฌ๋ณด๊ธฐ", variant="secondary")
711
+
712
+ with gr.TabItem("๐Ÿ‘‘ ํžˆ์–ด๋กœ ๊ฐ€๋ฌธ"):
713
+ gr.Markdown("""
714
+ ### ๐Ÿฐ ์œ„๋Œ€ํ•œ ํžˆ์–ด๋กœ ๊ฐ€๋ฌธ์˜ ์œ ์‚ฐ
715
+ ๊ฐ•๋ ฅํ•œ ํžˆ์–ด๋กœ ๊ฐ€๋ฌธ์˜ ํŠน์„ฑ์„ ๊ณ„์Šนํ•˜์—ฌ ์ƒˆ๋กœ์šด ํžˆ์–ด๋กœ๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
716
+ """)
717
+
718
  with gr.Row():
719
+ fasta_msa = gr.File(
720
+ label='๊ฐ€๋ฌธ DNA ๋ฐ์ดํ„ฐ',
721
+ info="ํžˆ์–ด๋กœ ๊ฐ€๋ฌธ์˜ DNA ์ •๋ณด๊ฐ€ ๋‹ด๊ธด ํŒŒ์ผ์„ ์—…๋กœ๋“œํ•˜์„ธ์š”"
722
+ )
723
+ input_pssm = gr.File(
724
+ label='๊ฐ€๋ฌธ ํŠน์„ฑ ๋ฐ์ดํ„ฐ',
725
+ info="์ด๋ฏธ ๋ถ„์„๋œ ๊ฐ€๋ฌธ ํŠน์„ฑ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค๋ฉด ์—…๋กœ๋“œํ•˜์„ธ์š”"
726
+ )
727
+
728
+ pssm = gr.File(label='๋ถ„์„๋œ ๊ฐ€๋ฌธ ํŠน์„ฑ')
729
+ pssm_view = gr.Plot(label='๊ฐ€๋ฌธ ํŠน์„ฑ ๋ถ„์„ ๊ฒฐ๊ณผ')
730
+ pssm_gen_btn = gr.Button("โœจ ๊ฐ€๋ฌธ ํŠน์„ฑ ๋ถ„์„", variant="secondary")
731
 
732
  with gr.Column():
733
  gr.Markdown("## ๐Ÿฆธโ€โ™‚๏ธ ํžˆ์–ด๋กœ ํ”„๋กœํ•„")
 
737
 
738
  # ํžˆ์–ด๋กœ ์„ค๋ช…
739
  hero_description = gr.Textbox(label="ํžˆ์–ด๋กœ ํŠน์„ฑ", lines=3)
 
740
 
741
+ gr.Markdown("## ๐Ÿงฌ ํžˆ์–ด๋กœ DNA ๋ถ„์„ ๊ฒฐ๊ณผ")
742
+ gr.Markdown("#### โšก DNA ์•ˆ์ •์„ฑ ์ ์ˆ˜")
743
+ plddt_plot = gr.Plot(label='์•ˆ์ •์„ฑ ๋ถ„์„')
744
+ gr.Markdown("#### ๐Ÿ“ DNA ์‹œํ€€์Šค")
745
+ output_seq = gr.Textbox(label="DNA ์„œ์—ด")
746
+ gr.Markdown("#### ๐Ÿ’พ DNA ๋ฐ์ดํ„ฐ")
747
+ output_pdb = gr.File(label="DNA ํŒŒ์ผ")
748
+ gr.Markdown("#### ๐Ÿ”ฌ DNA ๊ตฌ์กฐ")
749
  output_viewer = gr.HTML()
750
 
751
+ # ์ด๋ฒคํŠธ ์—ฐ๊ฒฐ ๋ถ€๋ถ„์€ ๋™์ผํ•˜๊ฒŒ ์œ ์ง€
752
+
753
+
754
+
755
  # ์ด๋ฒคํŠธ ์—ฐ๊ฒฐ
756
  preview_btn.click(get_motif_preview,[pdb_id_code, contigs],[preview_viewer, rewrite_pdb])
757
  pssm_gen_btn.click(get_pssm,[fasta_msa,input_pssm],[pssm_view, pssm])