--- title: Links To HF Dataset emoji: 🤗 colorFrom: yellow colorTo: red sdk: gradio pinned: false --- # Links → Hugging Face Dataset > ⚠️ This is a **Static** Space (free tier). It hosts the code + docs below. > The actual tool is a **Gradio** app (`app.py`). To run the live demo, duplicate > this Space and change the SDK to **Gradio**, or run it locally / on a Gradio Space. Paste **direct download links** (one per line, at least 3) and a **dataset name**, and the app downloads each file and pushes it to the Hugging Face Hub as a dataset. ## Files in this repo - `app.py` — the Gradio application - `requirements.txt` — Python dependencies - `index.html` — this static landing page ## Run it as a Gradio Space 1. Click **⋮ → Duplicate this Space**, choosing **Gradio** as the SDK (requires PRO for free cpu-basic), or create a new Gradio Space and upload `app.py` + `requirements.txt`. 2. In **Settings → Variables and secrets**, add a secret named `HF_TOKEN` with a **write** token from https://huggingface.co/settings/tokens. ## Run it locally ```bash pip install -r requirements.txt export HF_TOKEN=hf_your_write_token python app.py # opens on http://localhost:7860 ``` ## Behaviour - Enter 3+ direct-download URLs, one per line. - Leave the dataset name blank → it's named after the **domain of the first link** (e.g. `https://example.com/a.zip` → `example-com`). - If the dataset already exists under your account, files are added; otherwise it's created. ## Allowed file types `png, jpg, jpeg, jfif, exe, tar, rar, zip, 7z, gz, webp, webm, txt, py, js`