Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,16 +47,15 @@ def list_egoverse_uuids(n: int = 50) -> list[str]:
|
|
| 47 |
|
| 48 |
|
| 49 |
def list_abc_uuids(task: str, n: int = 50) -> list[str]:
|
| 50 |
-
"""Return up to n episode UUIDs for a given abc task."""
|
| 51 |
fs = HfFileSystem()
|
| 52 |
try:
|
| 53 |
base = f"datasets/{ABC_REPO}/data/train/{task}"
|
| 54 |
entries = fs.ls(base, detail=False)
|
| 55 |
uuids = []
|
| 56 |
for e in entries:
|
| 57 |
-
name = Path(e).name
|
| 58 |
if name.startswith("episode_"):
|
| 59 |
-
uuids.append(name)
|
| 60 |
if len(uuids) >= n:
|
| 61 |
break
|
| 62 |
return sorted(uuids)
|
|
|
|
| 47 |
|
| 48 |
|
| 49 |
def list_abc_uuids(task: str, n: int = 50) -> list[str]:
|
|
|
|
| 50 |
fs = HfFileSystem()
|
| 51 |
try:
|
| 52 |
base = f"datasets/{ABC_REPO}/data/train/{task}"
|
| 53 |
entries = fs.ls(base, detail=False)
|
| 54 |
uuids = []
|
| 55 |
for e in entries:
|
| 56 |
+
name = Path(e).name
|
| 57 |
if name.startswith("episode_"):
|
| 58 |
+
uuids.append(name[len("episode_"):]) # strip prefix
|
| 59 |
if len(uuids) >= n:
|
| 60 |
break
|
| 61 |
return sorted(uuids)
|