camillebrl commited on
Commit
36ab9df
·
verified ·
1 Parent(s): d4129ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -61,7 +61,7 @@ def evaluate_model(task: str, space_url: str):
61
  try:
62
  # Make API call to the space
63
  params = DEFAULT_PARAMS[task]
64
- response = requests.post(api_url, json=params)
65
  if response.status_code != 200:
66
  return None, None, None, gr.Warning(f"API call failed with status {response.status_code}")
67
 
@@ -133,7 +133,8 @@ def submit_results(task: str, results_json):
133
  path_in_repo=path_in_repo,
134
  repo_id=dataset_mapping[task],
135
  repo_type="dataset",
136
- token=HF_TOKEN
 
137
  )
138
 
139
  # Clean up
 
61
  try:
62
  # Make API call to the space
63
  params = DEFAULT_PARAMS[task]
64
+ response = requests.post(api_url, json=params, timeout=2500)
65
  if response.status_code != 200:
66
  return None, None, None, gr.Warning(f"API call failed with status {response.status_code}")
67
 
 
133
  path_in_repo=path_in_repo,
134
  repo_id=dataset_mapping[task],
135
  repo_type="dataset",
136
+ token=HF_TOKEN,
137
+ create_pr=True
138
  )
139
 
140
  # Clean up