osanseviero commited on
Commit
6ad3786
·
1 Parent(s): a0affac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -106,9 +106,8 @@ def update(sequence=DEFAULT_SEQ):
106
  name = sequence[:3] + sequence[-3:]
107
  pdb_filename = "test.pdb"
108
  pdb_string = response.content.decode('utf-8')
109
- tmp =
110
- with open(tmp.name, 'w') as f:
111
- f.write(pdb_string)
112
 
113
  return molecule(tmp.name), tmp.name
114
 
 
106
  name = sequence[:3] + sequence[-3:]
107
  pdb_filename = "test.pdb"
108
  pdb_string = response.content.decode('utf-8')
109
+ with tempfile.TemporaryFile(mode = "w") as tmp:
110
+ tmp.write(pdb_string)
 
111
 
112
  return molecule(tmp.name), tmp.name
113