import requests | |
def get_column_info(hub_repo_id): | |
url = f"https://datasets-server.huggingface.co/info?dataset={hub_repo_id}" | |
response = requests.get(url) | |
data = response.json() | |
description = data.get("dataset_info").get(hub_repo_id).get("description") | |
features = data.get("dataset_info").get(hub_repo_id).get("features") | |
return description, features | |
get_column_info("davidberenstein1957/test") | |