Spaces:
Running
on
T4
Running
on
T4
Fix user_history image error
Browse files- modules/user_history.py +1 -1
modules/user_history.py
CHANGED
@@ -177,7 +177,7 @@ def save_image(
|
|
177 |
metadata = {}
|
178 |
if "datetime" not in metadata:
|
179 |
metadata["datetime"] = str(datetime.now())
|
180 |
-
data = {"
|
181 |
with user_history._user_lock(username):
|
182 |
with user_history._user_jsonl_path(username).open("a") as f:
|
183 |
f.write(json.dumps(data) + "\n")
|
|
|
177 |
metadata = {}
|
178 |
if "datetime" not in metadata:
|
179 |
metadata["datetime"] = str(datetime.now())
|
180 |
+
data = {"image_path": str(image_path), "label": label, "metadata": metadata}
|
181 |
with user_history._user_lock(username):
|
182 |
with user_history._user_jsonl_path(username).open("a") as f:
|
183 |
f.write(json.dumps(data) + "\n")
|