Spaces:
Sleeping
Sleeping
XufengDuan
commited on
Commit
·
9daf453
1
Parent(s):
c5eb05a
update scripts
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ print("TOKEN", TOKEN)
|
|
27 |
|
28 |
def ui_snapshot_download(repo_id, local_dir, repo_type, tqdm_class, etag_timeout):
|
29 |
try:
|
30 |
-
print("local",local_dir)
|
31 |
snapshot_download(repo_id=repo_id, local_dir=local_dir, repo_type=repo_type, tqdm_class=tqdm_class, etag_timeout=etag_timeout)
|
32 |
except Exception as e:
|
33 |
restart_space()
|
@@ -142,13 +142,13 @@ def update_table(
|
|
142 |
hidden_df: pd.DataFrame,
|
143 |
columns: list,
|
144 |
#type_query: list,
|
145 |
-
precision_query: str,
|
146 |
-
size_query: list,
|
147 |
-
show_deleted: bool,
|
148 |
query: str,
|
149 |
):
|
150 |
# filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, show_deleted)
|
151 |
-
filtered_df = filter_models(hidden_df
|
152 |
filtered_df = filter_queries(query, filtered_df)
|
153 |
df = select_columns(filtered_df, columns)
|
154 |
return df
|
@@ -191,7 +191,7 @@ def filter_queries(query: str, filtered_df: pd.DataFrame) -> pd.DataFrame:
|
|
191 |
|
192 |
def filter_models(
|
193 |
# df: pd.DataFrame, type_query: list, size_query: list, precision_query: list, show_deleted: bool
|
194 |
-
df: pd.DataFrame
|
195 |
) -> pd.DataFrame:
|
196 |
# Show all models
|
197 |
# if show_deleted:
|
|
|
27 |
|
28 |
def ui_snapshot_download(repo_id, local_dir, repo_type, tqdm_class, etag_timeout):
|
29 |
try:
|
30 |
+
print("local", local_dir)
|
31 |
snapshot_download(repo_id=repo_id, local_dir=local_dir, repo_type=repo_type, tqdm_class=tqdm_class, etag_timeout=etag_timeout)
|
32 |
except Exception as e:
|
33 |
restart_space()
|
|
|
142 |
hidden_df: pd.DataFrame,
|
143 |
columns: list,
|
144 |
#type_query: list,
|
145 |
+
# precision_query: str,
|
146 |
+
# size_query: list,
|
147 |
+
# show_deleted: bool,
|
148 |
query: str,
|
149 |
):
|
150 |
# filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, show_deleted)
|
151 |
+
filtered_df = filter_models(hidden_df)
|
152 |
filtered_df = filter_queries(query, filtered_df)
|
153 |
df = select_columns(filtered_df, columns)
|
154 |
return df
|
|
|
191 |
|
192 |
def filter_models(
|
193 |
# df: pd.DataFrame, type_query: list, size_query: list, precision_query: list, show_deleted: bool
|
194 |
+
df: pd.DataFrame
|
195 |
) -> pd.DataFrame:
|
196 |
# Show all models
|
197 |
# if show_deleted:
|