Spaces:
Sleeping
Sleeping
Download scripts/download_data.py from HackathonAma/renal-ai-backend: direct link, hf CLI and curl.
- Browser
- Download file 632 Bytes
-
https://huggingface.co/spaces/HackathonAma/renal-ai-backend/resolve/main/scripts/download_data.py
- Command line
-
hf download hf://spaces/HackathonAma/renal-ai-backend/scripts/download_data.py
-
curl -L -o download_data.py https://huggingface.co/spaces/HackathonAma/renal-ai-backend/resolve/main/scripts/download_data.py
632 Bytes
| import requests | |
| import pandas as pd | |
| import os | |
| url = "https://docs.google.com/spreadsheets/d/1a4iZPf93nLejpL7d7LYnF9JliV10etsJS8ia-bw1MXg/export?format=csv" | |
| output_path = r"c:\Users\HP\Desktop\Bootcamp AMA\ckd_dataset.csv" | |
| try: | |
| response = requests.get(url) | |
| response.raise_for_status() | |
| with open(output_path, "wb") as f: | |
| f.write(response.content) | |
| print(f"Successfully downloaded dataset to {output_path}") | |
| df = pd.read_csv(output_path) | |
| print("--- DATASET PREVIEW ---") | |
| print(df.head()) | |
| print("\n--- DATASET INFO ---") | |
| print(df.info()) | |
| except Exception as e: | |
| print(f"Error: {e}") | |