Download DEPLOY.md from Imene-ee/Drape: direct link, hf CLI and curl.
- Browser
- Download file 4.32 kB
-
https://huggingface.co/spaces/Imene-ee/Drape/resolve/main/DEPLOY.md
- Command line
-
hf download hf://spaces/Imene-ee/Drape/DEPLOY.md
-
curl -L -o DEPLOY.md https://huggingface.co/spaces/Imene-ee/Drape/resolve/main/DEPLOY.md
A newer version of the Gradio SDK is available: 6.32.0
Deploying Drape (free, ~1 hour)
Three free services: GitHub (code), Google Colab (one-time GPU job that builds the catalog), Hugging Face (the live app).
Replace YOUR-GH with your GitHub username. Your Hugging Face username is assumed to be Imene-ee.
0. One-time setup (5 min)
- Install Git and Git LFS (Git for Windows already includes LFS). Then run once:
git lfs install - Hugging Face β Settings β Access Tokens β Create new token β type Write β copy it somewhere safe.
1. Push to GitHub (10 min)
- Go to https://github.com/new β name
drapeβ Public β do not add a README, .gitignore or licence β Create. - Unzip
drape.zip, open a terminal inside thedrapefolder:
git init
git add .
git commit -m "Drape v0.1: shop-the-look with fashion embeddings"
git branch -M main
git remote add origin https://github.com/YOUR-GH/drape.git
git push -u origin main
If Git asks for a password, GitHub wants a personal access token, not your password (GitHub β Settings β Developer settings β Personal access tokens), or install GitHub CLI and run gh auth login first.
- Open the repo's Actions tab: the tests workflow should go green in ~2 minutes.
2. Build the catalog index on Colab (25 min, mostly waiting)
- https://colab.research.google.com β File β Open notebook β GitHub tab β paste
https://github.com/YOUR-GH/drapeβ opennotebooks/build_index_colab.ipynb. - Runtime β Change runtime type β T4 GPU.
- Click the key icon (Secrets) in the left sidebar β add
HF_TOKEN= your write token β switch on Notebook access. - In cell 1, put your GitHub username in
GITHUB_REPO. - Runtime β Run all.
Check the build cell's last lines: the item count per category, and "zero-shot group agrees with keyword label on X%". The index is now at huggingface.co/datasets/Imene-ee/drape-catalog.
- The last cell downloads
benchmark_results.zip. Unzip it into the repo so you havebenchmark/results.md, then:
git add benchmark
git commit -m "Add benchmark results"
git push
Also paste the contents of benchmark/results.md into the Benchmark section of README.md.
3. Create the live Space (15 min)
- https://huggingface.co/new-space β name
Drapeβ SDK Gradio β hardware ZeroGPU (the only free option for Gradio on a free account; this is your 2nd of 2 slots, LabLens is the 1st) β Public β Create. - From the
drapefolder:
git remote add space https://huggingface.co/spaces/Imene-ee/Drape
git push --force space main
Username: Imene-ee. Password: your write token. (--force replaces the placeholder commit Hugging Face created.)
- Watch the Logs tab: build (
5 min), then first start downloads the two models (1β2 min). You want to seeDrape ready. - Test: Surprise me β Find the pieces; upload a full-body outfit photo; the Search the catalog tab.
From now on, every update is: git push (GitHub) and git push space main (live app).
4. Polish (15 min)
- Add 2β4 outfit photos to
examples/(your own, or Pexels/Unsplash), push to both remotes. - Take a screenshot of a good result β
docs/screenshot.pngβ uncomment the line inREADME.md. - GitHub repo β β next to About β website = the Space URL; then pin the repo on your profile.
Troubleshooting
| What you see | Fix |
|---|---|
App shows Setup needed with RepositoryNotFoundError |
The index repo name differs or is private. Make the dataset public, or Space β Settings β Variables β DRAPE_INDEX_REPO = your-name/your-repo, then Restart. |
| Space build fails on the Gradio version | In README.md, set sdk_version to the version Hugging Face pre-filled when it created the Space, push again. |
push rejected β¦ binary files |
Run git lfs install, then git add --renormalize ., commit and push again. |
Colab: HF_TOKEN not found |
Secrets panel β turn on Notebook access for HF_TOKEN. |
| Colab: build says No image column found | Paste the printed column list to Claude; the builder needs one image column. |
| Space says Sleeping | Free Spaces sleep after ~48 h without visitors; the first visit wakes it in about a minute. |