trying to read from dataset
Browse files
app.py
CHANGED
@@ -37,11 +37,11 @@ def submit_boundary(
|
|
37 |
tmp_boundary_path = pathlib.Path(tmp_boundary.name)
|
38 |
|
39 |
# write to dataset
|
40 |
-
filename = f"
|
41 |
record = {
|
42 |
"submission_time": timestamp,
|
43 |
"problem_type": problem_type,
|
44 |
-
"boundary_json": file_content
|
45 |
"evaluated": False,
|
46 |
}
|
47 |
with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as tmp:
|
|
|
37 |
tmp_boundary_path = pathlib.Path(tmp_boundary.name)
|
38 |
|
39 |
# write to dataset
|
40 |
+
filename = f"{problem_type}/{timestamp.replace(':', '-')}_{problem_type}.json"
|
41 |
record = {
|
42 |
"submission_time": timestamp,
|
43 |
"problem_type": problem_type,
|
44 |
+
"boundary_json": file_content.decode("utf-8"),
|
45 |
"evaluated": False,
|
46 |
}
|
47 |
with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as tmp:
|