Spaces:
Runtime error
Runtime error
as-cle-bert
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
from transformers import AutoTokenizer, EsmForProteinFolding
|
2 |
from transformers.models.esm.openfold_utils.protein import to_pdb, Protein as OFProtein
|
3 |
from transformers.models.esm.openfold_utils.feats import atom14_to_atom37
|
4 |
-
from proteins_viz import *
|
5 |
import gradio as gr
|
6 |
import spaces
|
7 |
from gradio_molecule3d import Molecule3D
|
@@ -127,9 +126,8 @@ def fold_protein(test_protein):
|
|
127 |
pdb = convert_outputs_to_pdb(output)
|
128 |
with open("output_structure.pdb", "w") as f:
|
129 |
f.write("".join(pdb))
|
130 |
-
image = take_care("output_structure.pdb")
|
131 |
html = molecule("output_structure.pdb")
|
132 |
-
return
|
133 |
|
134 |
iface = gr.Interface(
|
135 |
title="everything-ai-proteinfold",
|
@@ -140,7 +138,7 @@ iface = gr.Interface(
|
|
140 |
lines=5,
|
141 |
value=f"Paste or write amino-acidic sequence here",
|
142 |
),
|
143 |
-
outputs=[gr.
|
144 |
examples=[
|
145 |
"MVHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH",
|
146 |
"MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGETCLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHQYREQIKRVKDSDDVPMVLVGNKCDLAARTVESRQAQDLARSYGIPYIETSAKTRQGVEDAFYTLVREIRQHKLRKLNPPDESGPGCMSCKCVLS",
|
|
|
1 |
from transformers import AutoTokenizer, EsmForProteinFolding
|
2 |
from transformers.models.esm.openfold_utils.protein import to_pdb, Protein as OFProtein
|
3 |
from transformers.models.esm.openfold_utils.feats import atom14_to_atom37
|
|
|
4 |
import gradio as gr
|
5 |
import spaces
|
6 |
from gradio_molecule3d import Molecule3D
|
|
|
126 |
pdb = convert_outputs_to_pdb(output)
|
127 |
with open("output_structure.pdb", "w") as f:
|
128 |
f.write("".join(pdb))
|
|
|
129 |
html = molecule("output_structure.pdb")
|
130 |
+
return html, "output_structure.pdb"
|
131 |
|
132 |
iface = gr.Interface(
|
133 |
title="everything-ai-proteinfold",
|
|
|
138 |
lines=5,
|
139 |
value=f"Paste or write amino-acidic sequence here",
|
140 |
),
|
141 |
+
outputs=[gr.HTML(label="Protein 3D model"), Molecule3D(label="Molecular 3D model", reps=reps)],
|
142 |
examples=[
|
143 |
"MVHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH",
|
144 |
"MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGETCLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHQYREQIKRVKDSDDVPMVLVGNKCDLAARTVESRQAQDLARSYGIPYIETSAKTRQGVEDAFYTLVREIRQHKLRKLNPPDESGPGCMSCKCVLS",
|