awacke1 commited on
Commit
4fc08c6
1 Parent(s): c62c579

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -11
app.py CHANGED
@@ -18,17 +18,6 @@ async def get_splits(dataset_name: str) -> Dict[str, List[Dict]]:
18
  }
19
 
20
  async def get_valid_datasets() -> List[str]:
21
- URL = f"https://huggingface.co/api/datasets"
22
- async with httpx.AsyncClient() as session:
23
- response = await session.get(URL)
24
- try:
25
- datasets_raw = response.text.split(",")
26
- datasets = [dataset.strip() for dataset in datasets_raw if "/" in dataset]
27
- except (KeyError, json.JSONDecodeError):
28
- datasets = [] # Set a default value if the response is not in the expected format
29
- return datasets
30
-
31
- async def get_valid_datasets_old() -> List[str]:
32
  URL = f"https://huggingface.co/api/datasets"
33
  async with httpx.AsyncClient() as session:
34
  response = await session.get(URL)
 
18
  }
19
 
20
  async def get_valid_datasets() -> List[str]:
 
 
 
 
 
 
 
 
 
 
 
21
  URL = f"https://huggingface.co/api/datasets"
22
  async with httpx.AsyncClient() as session:
23
  response = await session.get(URL)