Spaces:
Runtime error
Runtime error
Handle new submission format
Browse files- app.py +4 -0
- requirements.txt +1 -1
app.py
CHANGED
@@ -57,6 +57,10 @@ def format_submissions(submissions):
|
|
57 |
submission_data["Submitter"].append(username)
|
58 |
submission_id = card_data["submission_id"]
|
59 |
submission_name, sha, timestamp = submission_id.split("__")
|
|
|
|
|
|
|
|
|
60 |
submission_data["Submission Name"].append(submission_name)
|
61 |
timestamp = pd.to_datetime(int(timestamp))
|
62 |
submission_data["Submission Date"].append(datetime.date(timestamp).strftime("%b %d, %Y"))
|
|
|
57 |
submission_data["Submitter"].append(username)
|
58 |
submission_id = card_data["submission_id"]
|
59 |
submission_name, sha, timestamp = submission_id.split("__")
|
60 |
+
# Format submission names with new backend constraints
|
61 |
+
# TODO(lewtun): make this less hacky!
|
62 |
+
if "_XXX_" in submission_name:
|
63 |
+
submission_name = submission_name.replace("_XXX_", " ")
|
64 |
submission_data["Submission Name"].append(submission_name)
|
65 |
timestamp = pd.to_datetime(int(timestamp))
|
66 |
submission_data["Submission Date"].append(datetime.date(timestamp).strftime("%b %d, %Y"))
|
requirements.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
pandas
|
2 |
python-dotenv
|
3 |
protobuf~=3.19.0
|
|
|
1 |
+
pandas<=1.4
|
2 |
python-dotenv
|
3 |
protobuf~=3.19.0
|