Spaces:
Runtime error
Runtime error
Update run.py
Browse files
run.py
CHANGED
@@ -8,8 +8,8 @@ dataset_options = [
|
|
8 |
"OpenVideo/pexels-raw",
|
9 |
"OpenVideo/Sample-2k",
|
10 |
]
|
11 |
-
fetch_files
|
12 |
-
fetch_files_select_idx
|
13 |
|
14 |
def login(token):
|
15 |
u = HFUser.from_token(token)
|
@@ -22,6 +22,7 @@ def list_dataset(u, repo):
|
|
22 |
print(f"repo is: {repo}")
|
23 |
files = u.list_dataset(repo)
|
24 |
fetch_files = files
|
|
|
25 |
return gr.Dropdown(value=files[0], choices=files), gr.Column(visible=True), gr.Column(visible=False)
|
26 |
|
27 |
def fetch_parquet(u, fname):
|
|
|
8 |
"OpenVideo/pexels-raw",
|
9 |
"OpenVideo/Sample-2k",
|
10 |
]
|
11 |
+
global fetch_files
|
12 |
+
global fetch_files_select_idx
|
13 |
|
14 |
def login(token):
|
15 |
u = HFUser.from_token(token)
|
|
|
22 |
print(f"repo is: {repo}")
|
23 |
files = u.list_dataset(repo)
|
24 |
fetch_files = files
|
25 |
+
fetch_files_select_idx = 0
|
26 |
return gr.Dropdown(value=files[0], choices=files), gr.Column(visible=True), gr.Column(visible=False)
|
27 |
|
28 |
def fetch_parquet(u, fname):
|