giulia-fontanella commited on
Commit
39d56d8
·
verified ·
1 Parent(s): b2e2643

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -95,7 +95,9 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
95
  if file_name!='':
96
  files_url = f"{api_url}/files/{task_id}"
97
  file = requests.get(files_url, timeout=15)
98
- print(f"Downloaded {file} in {os.getcwd()}")
 
 
99
  if not task_id or question_text is None:
100
  print(f"Skipping item with missing task_id or question: {item}")
101
  continue
 
95
  if file_name!='':
96
  files_url = f"{api_url}/files/{task_id}"
97
  file = requests.get(files_url, timeout=15)
98
+ with open(file_name, 'wb') as f:
99
+ f.write(file.content)
100
+ print(f"Downloaded {files_url}.")
101
  if not task_id or question_text is None:
102
  print(f"Skipping item with missing task_id or question: {item}")
103
  continue