Pablo Dejuan commited on
Commit
6c43b62
·
1 Parent(s): 9b9c1f1

fix(space): use Gradio SDK in root README — stop docker http.server directory listing

Browse files
README.md CHANGED
@@ -1,10 +1,25 @@
1
  ---
2
- title: Arty Train Cnnrnn
3
- emoji: 🐨
4
- colorFrom: pink
5
- colorTo: purple
6
- sdk: docker
 
 
 
7
  pinned: false
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Artydemo
3
+ emoji: 🦀
4
+ colorFrom: purple
5
+ colorTo: gray
6
+ sdk: gradio
7
+ sdk_version: "5.0.0"
8
+ python_version: "3.11"
9
+ app_file: gradio/app.py
10
  pinned: false
11
  ---
12
 
13
+ # Arty
14
+
15
+ WikiArt **genre / style / artist** classifiers (CNN baseline and CNN-RNN). This Hugging Face **Space** runs the **Gradio** app under [`gradio/app.py`](gradio/app.py); weights load from Hub model repos and architecture from [`src/model.py`](src/model.py).
16
+
17
+ **Training** (Docker GPU job) lives in [`Dockerfile`](Dockerfile) — use a **separate** Space pointed at the same repo if you only want training, or run locally. Do not set `sdk: docker` on this Space if you want the Gradio UI.
18
+
19
+ ## Env (optional)
20
+
21
+ - `BASELINE_MODEL_REPO_ID` — default `pdjota/cnn-baseline`
22
+ - `CNNRNN_MODEL_REPO_ID` — default `pdjota/arty-cnn-rnn`
23
+ - `HF_TOKEN` — if model repos are gated
24
+
25
+ More detail: [`gradio/README.md`](gradio/README.md), [`docs/monorepo_gradio_space.md`](docs/monorepo_gradio_space.md).
docs/README_HF_training_docker.md ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Arty Train CNN-RNN
3
+ emoji: 🐨
4
+ colorFrom: pink
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ ---
9
+
10
+ # HF training Space (Docker)
11
+
12
+ Use this README as the **Space README** only for a **dedicated training Space** (e.g. `pdjota/arty-train-cnnrnn`), not for the Gradio demo Space.
13
+
14
+ The repo [`Dockerfile`](../Dockerfile) runs dataset materialization, training, and model upload. See comments in that file for environment variables.
15
+
16
+ The **Gradio demo** Space should use **`sdk: gradio`** in the **root** [`README.md`](../README.md), not Docker.
gradio/README.md CHANGED
@@ -1,19 +1,8 @@
1
- ---
2
- title: Artydemo
3
- emoji: 🦀
4
- colorFrom: purple
5
- colorTo: gray
6
- sdk: gradio
7
- sdk_version: "5.0.0"
8
- python_version: "3.11"
9
- app_file: gradio/app.py
10
- pinned: false
11
- ---
12
-
13
  # Arty Gradio demo (monorepo)
14
 
15
- - Set **`app_file`** to **`gradio/app.py`** (see YAML above).
16
- - The build must include **`src/model.py`** (architecture) while **weights** load from Hub model repos.
 
17
 
18
  ## Local run
19
 
@@ -33,7 +22,7 @@ python app.py
33
  ## Hugging Face Space checklist
34
 
35
  1. Space **linked repo** = your Arty **monorepo** (GitHub or HF Git).
36
- 2. **Root** `requirements.txt` is optional; if missing, Space uses **`gradio/requirements.txt`** when the app is under `gradio/` (or add a root `requirements.txt` that `-r gradio/requirements.txt`).
37
  3. Migrate off the old Space submodule: use **one repo** + `app_file: gradio/app.py`.
38
 
39
  See also **[docs/gradio_space_fix_options.md](../docs/gradio_space_fix_options.md)**.
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Arty Gradio demo (monorepo)
2
 
3
+ Hugging Face reads **Space SDK settings from the repo root** [`README.md`](../README.md) (`sdk: gradio`, `app_file: gradio/app.py`). If the root README used `sdk: docker`, the Space would **not** run this app.
4
+
5
+ The build must include **`src/model.py`** (architecture) while **weights** load from Hub model repos.
6
 
7
  ## Local run
8
 
 
22
  ## Hugging Face Space checklist
23
 
24
  1. Space **linked repo** = your Arty **monorepo** (GitHub or HF Git).
25
+ 2. **Root** [`requirements.txt`](../requirements.txt) must include Gradio deps (this repo adds `gradio` there for the Space build).
26
  3. Migrate off the old Space submodule: use **one repo** + `app_file: gradio/app.py`.
27
 
28
  See also **[docs/gradio_space_fix_options.md](../docs/gradio_space_fix_options.md)**.
requirements.txt CHANGED
@@ -8,6 +8,9 @@ pandas>=2.0
8
  scikit-learn>=1.2
9
  matplotlib>=3.7
10
  tqdm>=4.65
11
- huggingface_hub>=0.20 # model upload + Gradio Spaces (Phase 2)
12
  pytest>=7.0 # tests
13
  pytest-cov>=4.0 # coverage
 
 
 
 
8
  scikit-learn>=1.2
9
  matplotlib>=3.7
10
  tqdm>=4.65
11
+ huggingface_hub>=0.25.0,<1.0 # Gradio 5.x needs HfFolder; removed in hub 1.0
12
  pytest>=7.0 # tests
13
  pytest-cov>=4.0 # coverage
14
+
15
+ # Gradio demo (HF Space uses root requirements.txt)
16
+ gradio>=5.0,<6