Spaces:
Sleeping
Sleeping
Samuel Thomas
commited on
Commit
·
66a013c
1
Parent(s):
0616341
more debuggin'
Browse files
app.py
CHANGED
|
@@ -73,12 +73,15 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 73 |
# Call the API to retrieve the file; adjust params as needed
|
| 74 |
task_id = item['task_id']
|
| 75 |
api_response = requests.get(f"{api_url}/{task_id}")
|
|
|
|
| 76 |
if api_response.status_code == 200:
|
| 77 |
item['input_file'] = api_response.content # Store file as bytes
|
| 78 |
item['file_type'] = get_file_type(file_name)
|
| 79 |
item['file_path'] = write_bytes_to_temp_dir(item['input_file'], file_name)
|
| 80 |
else:
|
| 81 |
item['input_file'] = None # Or handle error as needed
|
|
|
|
|
|
|
| 82 |
except Exception as e:
|
| 83 |
tb_str = traceback.format_exc()
|
| 84 |
print(f"Error creating new states: {tb_str}")
|
|
|
|
| 73 |
# Call the API to retrieve the file; adjust params as needed
|
| 74 |
task_id = item['task_id']
|
| 75 |
api_response = requests.get(f"{api_url}/{task_id}")
|
| 76 |
+
print(f"api_response = {api_response.status_code}")
|
| 77 |
if api_response.status_code == 200:
|
| 78 |
item['input_file'] = api_response.content # Store file as bytes
|
| 79 |
item['file_type'] = get_file_type(file_name)
|
| 80 |
item['file_path'] = write_bytes_to_temp_dir(item['input_file'], file_name)
|
| 81 |
else:
|
| 82 |
item['input_file'] = None # Or handle error as needed
|
| 83 |
+
item['file_type'] = None
|
| 84 |
+
item['file_path'] = None
|
| 85 |
except Exception as e:
|
| 86 |
tb_str = traceback.format_exc()
|
| 87 |
print(f"Error creating new states: {tb_str}")
|