as-cle-bert commited on
Commit
eae90c3
·
verified ·
1 Parent(s): 3d9df12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
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 image, html, "output_structure.pdb"
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.Image(label="Protein static image"), gr.HTML(label="Protein 3D model"), Molecule3D(label="Molecular 3D model", reps=reps)],
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",