ynhe commited on
Commit
30f805c
1 Parent(s): c48aded

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,7 +28,7 @@ def add_new_eval(
28
  return "Error! Empty file!"
29
 
30
  # upload_data=json.loads(input_file)
31
- upload_content = input_file.read()
32
  submission_repo = Repository(local_dir=SUBMISSION_NAME, clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN, repo_type="dataset")
33
  submission_repo.git_pull()
34
  filename = now.strftime("%Y%m%d_%H%M%S")
@@ -57,7 +57,7 @@ def add_new_eval(
57
  model_name = '[' + model_name + '](' + model_link + ')'
58
 
59
  os.makedirs(filename, exist_ok=True)
60
- with zipfile.ZipFile(io.BytesIO(input_file.read()), 'r') as zip_ref:
61
  zip_ref.extractall(filename)
62
 
63
  upload_data = {}
 
28
  return "Error! Empty file!"
29
 
30
  # upload_data=json.loads(input_file)
31
+ upload_content = input_file
32
  submission_repo = Repository(local_dir=SUBMISSION_NAME, clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN, repo_type="dataset")
33
  submission_repo.git_pull()
34
  filename = now.strftime("%Y%m%d_%H%M%S")
 
57
  model_name = '[' + model_name + '](' + model_link + ')'
58
 
59
  os.makedirs(filename, exist_ok=True)
60
+ with zipfile.ZipFile(io.BytesIO(input_file), 'r') as zip_ref:
61
  zip_ref.extractall(filename)
62
 
63
  upload_data = {}