Spaces:
Runtime error
Runtime error
Commit
·
26a5993
1
Parent(s):
d088eb7
update
Browse files
app.py
CHANGED
|
@@ -83,7 +83,7 @@ def save_session_data(username, data):
|
|
| 83 |
api = HfApi()
|
| 84 |
api.upload_file(
|
| 85 |
path_or_fileobj=temp_file_path,
|
| 86 |
-
path_in_repo=f"
|
| 87 |
repo_id="luulinh90s/Tabular-LLM-Study-Data", # Replace with your new data storage Space name
|
| 88 |
repo_type="space",
|
| 89 |
)
|
|
@@ -104,7 +104,7 @@ def load_session_data(username):
|
|
| 104 |
files = api.list_repo_files(repo_id="luulinh90s/Tabular-LLM-Study-Data", repo_type="space", path="session_data")
|
| 105 |
|
| 106 |
# Filter and sort files for the user
|
| 107 |
-
user_files = [f for f in files if f.startswith(f'
|
| 108 |
|
| 109 |
if not user_files:
|
| 110 |
logger.warning(f"No session data found for user {username}")
|
|
|
|
| 83 |
api = HfApi()
|
| 84 |
api.upload_file(
|
| 85 |
path_or_fileobj=temp_file_path,
|
| 86 |
+
path_in_repo=f"session_data_pref/{file_name}",
|
| 87 |
repo_id="luulinh90s/Tabular-LLM-Study-Data", # Replace with your new data storage Space name
|
| 88 |
repo_type="space",
|
| 89 |
)
|
|
|
|
| 104 |
files = api.list_repo_files(repo_id="luulinh90s/Tabular-LLM-Study-Data", repo_type="space", path="session_data")
|
| 105 |
|
| 106 |
# Filter and sort files for the user
|
| 107 |
+
user_files = [f for f in files if f.startswith(f'session_data_pref/{username}_') and f.endswith('_session.json')]
|
| 108 |
|
| 109 |
if not user_files:
|
| 110 |
logger.warning(f"No session data found for user {username}")
|