Spaces:
Sleeping
Sleeping
fatmacankara
commited on
Commit
·
d3cba9e
1
Parent(s):
ef2460e
Update code/pdb_featureVector.py
Browse files
code/pdb_featureVector.py
CHANGED
@@ -257,9 +257,9 @@ def pdb(input_set, mode, impute):
|
|
257 |
if response.status_code == 200:
|
258 |
st.write('here1')
|
259 |
# Save the PDB file to a local file
|
260 |
-
st.write(
|
261 |
#try:
|
262 |
-
# with open(
|
263 |
# st.write('WRITING TO FILE')
|
264 |
#except:
|
265 |
# st.write('ERROR')
|
@@ -268,6 +268,7 @@ def pdb(input_set, mode, impute):
|
|
268 |
|
269 |
from huggingface_hub import HfApi
|
270 |
api = HfApi()
|
|
|
271 |
api.upload_file(
|
272 |
path_or_fileobj=response.content,
|
273 |
path_in_repo="out_files/pdb/pdb_structures/",
|
@@ -277,6 +278,7 @@ def pdb(input_set, mode, impute):
|
|
277 |
else:
|
278 |
st.write('Here2')
|
279 |
st.write(f"Failed to retrieve PDB file for {search}.")
|
|
|
280 |
st.write('what')
|
281 |
existing_pdb = list(Path(path_to_output_files / 'pdb_structures').glob("*"))
|
282 |
st.write('existing_pdb3', existing_pdb)
|
|
|
257 |
if response.status_code == 200:
|
258 |
st.write('here1')
|
259 |
# Save the PDB file to a local file
|
260 |
+
#st.write(f'out_files/pdb/pdb_structures/{search}.pdb')
|
261 |
#try:
|
262 |
+
# with open(f'out_files/pdb/pdb_structures/{search}.pdb', "wb") as f:
|
263 |
# st.write('WRITING TO FILE')
|
264 |
#except:
|
265 |
# st.write('ERROR')
|
|
|
268 |
|
269 |
from huggingface_hub import HfApi
|
270 |
api = HfApi()
|
271 |
+
st.write('api', api)
|
272 |
api.upload_file(
|
273 |
path_or_fileobj=response.content,
|
274 |
path_in_repo="out_files/pdb/pdb_structures/",
|
|
|
278 |
else:
|
279 |
st.write('Here2')
|
280 |
st.write(f"Failed to retrieve PDB file for {search}.")
|
281 |
+
|
282 |
st.write('what')
|
283 |
existing_pdb = list(Path(path_to_output_files / 'pdb_structures').glob("*"))
|
284 |
st.write('existing_pdb3', existing_pdb)
|