Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -469,22 +469,18 @@ def generate_hero(name, strength, flexibility, speed, defense, size, abilities):
|
|
469 |
|
470 |
if final_result is None:
|
471 |
raise Exception("์์ฑ ๊ฒฐ๊ณผ๊ฐ ์์ต๋๋ค")
|
472 |
-
|
473 |
-
output_seq, output_pdb, structure_view, plddt_plot = final_result
|
474 |
|
475 |
# ๋ฅ๋ ฅ์น ๊ณ์ฐ
|
476 |
stats = calculate_hero_stats(flexibility, strength, speed, defense)
|
477 |
|
478 |
-
# ๊ฒฐ๊ณผ ๋ฐํ
|
479 |
return (
|
480 |
-
structure_view, # 3D ๊ตฌ์กฐ
|
481 |
create_radar_chart(stats), # ๋ฅ๋ ฅ์น ์ฐจํธ
|
482 |
generate_hero_description(name, stats, abilities) # ํ์ด๋ก ์ค๋ช
|
483 |
)
|
484 |
except Exception as e:
|
485 |
-
print(f"Error in generate_hero: {str(e)}")
|
486 |
return (
|
487 |
-
gr.HTML("์๋ฌ๊ฐ ๋ฐ์ํ์ต๋๋ค"),
|
488 |
None,
|
489 |
f"์๋ฌ: {str(e)}"
|
490 |
)
|
@@ -634,17 +630,16 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
634 |
|
635 |
with gr.Column():
|
636 |
gr.Markdown("## ๐ฆธโโ๏ธ ํ์ด๋ก ํ๋กํ")
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
# ๋ฅ๋ ฅ์น ๋ ์ด๋ ์ฐจํธ
|
642 |
hero_stats = gr.Plot(label="๋ฅ๋ ฅ์น ๋ถ์")
|
643 |
-
|
644 |
-
|
645 |
hero_description = gr.Textbox(label="ํ์ด๋ก ํน์ฑ", lines=3)
|
646 |
-
|
647 |
-
|
648 |
download_btn = gr.Button("ํ์ด๋ก ๋ฐ์ดํฐ ๋ค์ด๋ก๋")
|
649 |
|
650 |
gr.Markdown("""## OUTPUTS""")
|
@@ -657,15 +652,20 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
657 |
gr.Markdown("""#### Structure viewer""")
|
658 |
output_viewer = gr.HTML()
|
659 |
|
|
|
|
|
660 |
# ์ด๋ฒคํธ ์ฐ๊ฒฐ
|
661 |
preview_btn.click(get_motif_preview,[pdb_id_code, contigs],[preview_viewer, rewrite_pdb])
|
662 |
pssm_gen_btn.click(get_pssm,[fasta_msa,input_pssm],[pssm_view, pssm])
|
|
|
|
|
663 |
create_btn.click(
|
664 |
generate_hero,
|
665 |
inputs=[hero_name, strength, flexibility, speed, defense, hero_size, special_ability],
|
666 |
-
outputs=[
|
667 |
)
|
668 |
|
|
|
669 |
btn = gr.Button("GENERATE")
|
670 |
btn.click(protein_diffusion_model,
|
671 |
[sequence,
|
|
|
469 |
|
470 |
if final_result is None:
|
471 |
raise Exception("์์ฑ ๊ฒฐ๊ณผ๊ฐ ์์ต๋๋ค")
|
|
|
|
|
472 |
|
473 |
# ๋ฅ๋ ฅ์น ๊ณ์ฐ
|
474 |
stats = calculate_hero_stats(flexibility, strength, speed, defense)
|
475 |
|
476 |
+
# ๊ฒฐ๊ณผ ๋ฐํ (3D ๊ตฌ์กฐ ์ ์ธ)
|
477 |
return (
|
|
|
478 |
create_radar_chart(stats), # ๋ฅ๋ ฅ์น ์ฐจํธ
|
479 |
generate_hero_description(name, stats, abilities) # ํ์ด๋ก ์ค๋ช
|
480 |
)
|
481 |
except Exception as e:
|
482 |
+
print(f"Error in generate_hero: {str(e)}")
|
483 |
return (
|
|
|
484 |
None,
|
485 |
f"์๋ฌ: {str(e)}"
|
486 |
)
|
|
|
630 |
|
631 |
with gr.Column():
|
632 |
gr.Markdown("## ๐ฆธโโ๏ธ ํ์ด๋ก ํ๋กํ")
|
633 |
+
|
634 |
+
# ํ์ด๋ก ์๊ฐํ ๋ถ๋ถ ์ ๊ฑฐ (hero_structure ์ญ์ )
|
635 |
+
|
636 |
+
# ๋ฅ๋ ฅ์น ๋ ์ด๋ ์ฐจํธ
|
|
|
637 |
hero_stats = gr.Plot(label="๋ฅ๋ ฅ์น ๋ถ์")
|
638 |
+
|
639 |
+
# ํ์ด๋ก ์ค๋ช
|
640 |
hero_description = gr.Textbox(label="ํ์ด๋ก ํน์ฑ", lines=3)
|
641 |
+
|
642 |
+
# ๋ค์ด๋ก๋ ๋ฒํผ
|
643 |
download_btn = gr.Button("ํ์ด๋ก ๋ฐ์ดํฐ ๋ค์ด๋ก๋")
|
644 |
|
645 |
gr.Markdown("""## OUTPUTS""")
|
|
|
652 |
gr.Markdown("""#### Structure viewer""")
|
653 |
output_viewer = gr.HTML()
|
654 |
|
655 |
+
|
656 |
+
|
657 |
# ์ด๋ฒคํธ ์ฐ๊ฒฐ
|
658 |
preview_btn.click(get_motif_preview,[pdb_id_code, contigs],[preview_viewer, rewrite_pdb])
|
659 |
pssm_gen_btn.click(get_pssm,[fasta_msa,input_pssm],[pssm_view, pssm])
|
660 |
+
|
661 |
+
|
662 |
create_btn.click(
|
663 |
generate_hero,
|
664 |
inputs=[hero_name, strength, flexibility, speed, defense, hero_size, special_ability],
|
665 |
+
outputs=[hero_stats, hero_description] # hero_structure ์ ๊ฑฐ
|
666 |
)
|
667 |
|
668 |
+
|
669 |
btn = gr.Button("GENERATE")
|
670 |
btn.click(protein_diffusion_model,
|
671 |
[sequence,
|