osanseviero commited on
Commit
546cfd5
·
1 Parent(s): 451285c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -11,19 +11,18 @@ headers = {
11
 
12
  response = requests.post('https://api.esmatlas.com/foldSequence/v1/pdb/', headers=headers, data=sequence)
13
  name = sequence[:3] + sequence[-3:]
14
- pdb_filename = "test.pdb"
15
  pdb_string = response.content.decode('utf-8')
16
- #with open(pdb_filename, "w") as out:
17
- # out.write(pdb_string)
18
- # print(pdb_string)
19
 
20
- #xyzview = py3Dmol.view(js='https://3dmol.org/build/3Dmol.js', width=800, height=400)
 
 
21
  xyzview = py3Dmol.view()
22
- #xyzview.addModel(pdb_filename, "pdb")
23
  xyzview.addModel(pdb_string,'pdb')
24
  xyzview.setStyle({'cartoon':{
25
  "color": "spectrum",}})
26
  xyzview.zoomTo()
27
  print("Set style")
28
  showmol(xyzview, height = 500,width=800)
29
- print("Displayed")
 
 
 
11
 
12
  response = requests.post('https://api.esmatlas.com/foldSequence/v1/pdb/', headers=headers, data=sequence)
13
  name = sequence[:3] + sequence[-3:]
 
14
  pdb_string = response.content.decode('utf-8')
 
 
 
15
 
16
+ st.markdown("# ESM-2 Protein Folding demo")
17
+ st.markdown("You can input a single protein sequence and you get the predicted protein structure")
18
+
19
  xyzview = py3Dmol.view()
 
20
  xyzview.addModel(pdb_string,'pdb')
21
  xyzview.setStyle({'cartoon':{
22
  "color": "spectrum",}})
23
  xyzview.zoomTo()
24
  print("Set style")
25
  showmol(xyzview, height = 500,width=800)
26
+ print("Displayed")
27
+
28
+ st.markdown("[ESM](https://esmatlas.com/about) by Meta using the API. You can also use Hugging Face `transformers` as shown [here](https://github.com/huggingface/notebooks/blob/main/examples/protein_folding.ipynb), which is supported since [v4.24](https://github.com/huggingface/transformers/releases/tag/v4.24.0).")