Spaces:
Runtime error
Runtime error
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# LoRA Preprocess UI (Gradio)
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
|
|
|
|
|
|
| 9 |
|
| 10 |
-
##
|
| 11 |
```
|
| 12 |
pip install -r requirements.txt
|
| 13 |
python3 app.py
|
| 14 |
```
|
| 15 |
|
| 16 |
-
##
|
| 17 |
-
- `FLORENCE_URL`
|
| 18 |
-
- `FLORENCE_KEY`
|
| 19 |
-
|
| 20 |
-
Files are saved to `outputs/preprocessed/` inside the Space container.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: LoRA Preprocess UI
|
| 3 |
+
emoji: 🧑🎨
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: gray
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 4.21.0
|
| 8 |
+
python_version: "3.10"
|
| 9 |
+
app_file: app.py
|
| 10 |
+
pinned: false
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
# LoRA Preprocess UI (Gradio)
|
| 14 |
|
| 15 |
+
Upload ~8 photos (selfies + body), get aligned/clean/face-neutral variants and `captions.jsonl` for LoRA fine-tuning.
|
| 16 |
+
|
| 17 |
+
## Features
|
| 18 |
+
- Face detection & aligned crops (OpenCV SSD)
|
| 19 |
+
- Background removal (rembg u2netp)
|
| 20 |
+
- Face-only neutralized variant to avoid memorizing clothes/jewelry
|
| 21 |
+
- Optional Florence-2 captioning (set `FLORENCE_URL`, `FLORENCE_KEY` env vars)
|
| 22 |
+
- Outputs saved under `outputs/preprocessed/` inside the container
|
| 23 |
|
| 24 |
+
## Run locally
|
| 25 |
```
|
| 26 |
pip install -r requirements.txt
|
| 27 |
python3 app.py
|
| 28 |
```
|
| 29 |
|
| 30 |
+
## Env vars (optional)
|
| 31 |
+
- `FLORENCE_URL`: endpoint that returns JSON with `caption`/`text`
|
| 32 |
+
- `FLORENCE_KEY`: bearer token for that endpoint
|
|
|
|
|
|