simonduerr commited on
Commit
d966828
1 Parent(s): a1af6af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ def get_pdb(upload_choice="PDB Code", pdb_code="", filepath=""):
11
  "AlphaFold DB": {"base":"https://alphafold.ebi.ac.uk/files/", "suffix": "-F1-model_v4.pdb"},
12
  "ESM Atlas": {"base": "https://api.esmatlas.com/fetchPredictedStructure/", "suffix":".pdb"}
13
  }
14
- if pdb_code is None or pdb_code == "":
15
  try:
16
  #move file to home folder to have it accessible from the web
17
  copyfile(filepath.name, os.path.join(os.getcwd(), os.path.basename(filepath.name)))
@@ -141,7 +141,7 @@ with demo:
141
 
142
 
143
  btn = gr.Button("View structure")
144
- gr.Examples([["PDB Code", "2CBA"], ["ESM Atlas", "MGYP001531319262"]], [upload_choice,inp])
145
  mol = gr.HTML()
146
  btn.click(fn=update, inputs=[upload_choice, inp, file, public_link], outputs=mol)
147
  _, _, pl = demo.launch() # use public link with share=True locally
 
11
  "AlphaFold DB": {"base":"https://alphafold.ebi.ac.uk/files/", "suffix": "-F1-model_v4.pdb"},
12
  "ESM Atlas": {"base": "https://api.esmatlas.com/fetchPredictedStructure/", "suffix":".pdb"}
13
  }
14
+ if upload_choice=="local file":
15
  try:
16
  #move file to home folder to have it accessible from the web
17
  copyfile(filepath.name, os.path.join(os.getcwd(), os.path.basename(filepath.name)))
 
141
 
142
 
143
  btn = gr.Button("View structure")
144
+ gr.Examples([["PDB Code", "2CBA"],["AlphaFold DB", "A0A1U8FD60"], ["ESM Atlas", "MGYP001531319262"]], [upload_choice,inp])
145
  mol = gr.HTML()
146
  btn.click(fn=update, inputs=[upload_choice, inp, file, public_link], outputs=mol)
147
  _, _, pl = demo.launch() # use public link with share=True locally