Spaces:
Running
Running
Commit
·
511bdf3
1
Parent(s):
c791eda
fix bugs
Browse files- app.py +1 -3
- src/backend.py +3 -0
app.py
CHANGED
@@ -63,9 +63,7 @@ if __name__ == "__main__":
|
|
63 |
lines=20,
|
64 |
interactive=False,
|
65 |
)
|
66 |
-
refresh_button = gr.Button(
|
67 |
-
text="Refresh log files",
|
68 |
-
)
|
69 |
|
70 |
log_file_dropdown.change(
|
71 |
fn=display_log_content,
|
|
|
63 |
lines=20,
|
64 |
interactive=False,
|
65 |
)
|
66 |
+
refresh_button = gr.Button("Refresh log files")
|
|
|
|
|
67 |
|
68 |
log_file_dropdown.change(
|
69 |
fn=display_log_content,
|
src/backend.py
CHANGED
@@ -122,6 +122,7 @@ def pull_search_results(
|
|
122 |
time_duration: int = 1800,
|
123 |
start_commit_id: str = None
|
124 |
):
|
|
|
125 |
if start_commit_id is not None:
|
126 |
API.snapshot_download(
|
127 |
repo_id=SEARCH_RESULTS_REPO,
|
@@ -135,7 +136,9 @@ def pull_search_results(
|
|
135 |
else:
|
136 |
cur_file_paths = get_file_list(hf_search_results_repo_dir, allowed_suffixes=['.json'])
|
137 |
|
|
|
138 |
while True:
|
|
|
139 |
try:
|
140 |
API.snapshot_download(
|
141 |
repo_id=RESULTS_REPO,
|
|
|
122 |
time_duration: int = 1800,
|
123 |
start_commit_id: str = None
|
124 |
):
|
125 |
+
print("Start from commit:", start_commit_id)
|
126 |
if start_commit_id is not None:
|
127 |
API.snapshot_download(
|
128 |
repo_id=SEARCH_RESULTS_REPO,
|
|
|
136 |
else:
|
137 |
cur_file_paths = get_file_list(hf_search_results_repo_dir, allowed_suffixes=['.json'])
|
138 |
|
139 |
+
print("Start to pull new search results ...")
|
140 |
while True:
|
141 |
+
os.makedirs(ZIP_CACHE_DIR, exist_ok=True)
|
142 |
try:
|
143 |
API.snapshot_download(
|
144 |
repo_id=RESULTS_REPO,
|