lewtun HF staff commited on
Commit
55a3478
β€’
1 Parent(s): 5597cc4

Add contact information

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -76,21 +76,17 @@ with st.form(key="form"):
76
  # Flush local repo
77
  shutil.rmtree(LOCAL_REPO, ignore_errors=True)
78
  submission_errors = 0
79
- uploaded_file = st.file_uploader("Upload submission.json file", type=["json"])
80
 
81
  if uploaded_file:
82
- if uploaded_file.name != "submission.json":
83
- st.error(f"β›” Invalid filename. Please upload a submission.json file.")
84
- submission_errors += 1
 
 
85
  else:
86
- data = str(uploaded_file.read(), "utf-8")
87
- json_data = json.loads(data)
88
- is_valid, message = validate_json(json_data)
89
- if is_valid:
90
- st.success(message)
91
- else:
92
- st.error(message)
93
- submission_errors += 1
94
 
95
  with st.expander("Submission format"):
96
  st.markdown(
@@ -124,7 +120,7 @@ with st.form(key="form"):
124
  example_submission = json.load(f)
125
  st.json(example_submission)
126
 
127
- user_name = st.text_input("Enter your πŸ€— Hub username")
128
 
129
  submit_button = st.form_submit_button("Make Submission")
130
 
@@ -203,10 +199,14 @@ if submit_button and submission_errors == 0:
203
 
204
  * πŸ“Š Click [here](https://huggingface.co/spaces/GEM/results) to view the results from your submission
205
  * πŸ’Ύ Click [here]({dataset_repo_url}) to view your submission file on the Hugging Face Hub
 
 
206
  """
207
  )
208
  else:
209
- st.error("πŸ™ˆ Oh noes, there was an error submitting your submission! Please contact the organisers")
 
 
210
 
211
  # Flush local repos
212
  shutil.rmtree(LOCAL_REPO, ignore_errors=True)
 
76
  # Flush local repo
77
  shutil.rmtree(LOCAL_REPO, ignore_errors=True)
78
  submission_errors = 0
79
+ uploaded_file = st.file_uploader("Upload submission file", type=["json"])
80
 
81
  if uploaded_file:
82
+ data = str(uploaded_file.read(), "utf-8")
83
+ json_data = json.loads(data)
84
+ is_valid, message = validate_json(json_data)
85
+ if is_valid:
86
+ st.success(message)
87
  else:
88
+ st.error(message)
89
+ submission_errors += 1
 
 
 
 
 
 
90
 
91
  with st.expander("Submission format"):
92
  st.markdown(
 
120
  example_submission = json.load(f)
121
  st.json(example_submission)
122
 
123
+ user_name = st.text_input("Enter your πŸ€— Hub username.")
124
 
125
  submit_button = st.form_submit_button("Make Submission")
126
 
 
199
 
200
  * πŸ“Š Click [here](https://huggingface.co/spaces/GEM/results) to view the results from your submission
201
  * πŸ’Ύ Click [here]({dataset_repo_url}) to view your submission file on the Hugging Face Hub
202
+
203
+ Please [contact the organisers](mailto:gehrmann@google.com) if you would like your submission and/or evaluation scores deleted.
204
  """
205
  )
206
  else:
207
+ st.error(
208
+ "πŸ™ˆ Oh noes, there was an error submitting your submission! Please [contact the organisers](mailto:gehrmann@google.com)"
209
+ )
210
 
211
  # Flush local repos
212
  shutil.rmtree(LOCAL_REPO, ignore_errors=True)