Spaces:
Running
Running
Update mtdna_backend.py
Browse files- mtdna_backend.py +2 -2
mtdna_backend.py
CHANGED
@@ -538,7 +538,7 @@ def load_user_usage():
|
|
538 |
parent_id = pipeline.get_or_create_drive_folder("mtDNA-Location-Classifier")
|
539 |
iterate3_id = pipeline.get_or_create_drive_folder("iterate3", parent_id=parent_id)
|
540 |
|
541 |
-
found = pipeline.find_drive_file("user_usage_log.json",
|
542 |
if not found:
|
543 |
return {} # not found, start fresh
|
544 |
|
@@ -581,7 +581,7 @@ def save_user_usage(usage_dict):
|
|
581 |
with open(tmp_path, "w") as f:
|
582 |
json.dump(usage_dict, f, indent=2)
|
583 |
|
584 |
-
pipeline.upload_file_to_drive(tmp_path, "user_usage_log.json",
|
585 |
|
586 |
except Exception as e:
|
587 |
print(f"❌ Failed to save user_usage_log.json to Google Drive: {e}")
|
|
|
538 |
parent_id = pipeline.get_or_create_drive_folder("mtDNA-Location-Classifier")
|
539 |
iterate3_id = pipeline.get_or_create_drive_folder("iterate3", parent_id=parent_id)
|
540 |
|
541 |
+
found = pipeline.find_drive_file("user_usage_log.json", parent_id=iterate3_id)
|
542 |
if not found:
|
543 |
return {} # not found, start fresh
|
544 |
|
|
|
581 |
with open(tmp_path, "w") as f:
|
582 |
json.dump(usage_dict, f, indent=2)
|
583 |
|
584 |
+
pipeline.upload_file_to_drive(tmp_path, "user_usage_log.json", parent_id=iterate3_id)
|
585 |
|
586 |
except Exception as e:
|
587 |
print(f"❌ Failed to save user_usage_log.json to Google Drive: {e}")
|