Spaces:
Running on Zero
Running on Zero
|
Download README.md from lsmpp/PixText-Studio: direct link, hf CLI and curl.
- Browser
- Download file 2.23 kB
-
https://huggingface.co/spaces/lsmpp/PixText-Studio/resolve/main/README.md
- Command line
-
hf download hf://spaces/lsmpp/PixText-Studio/README.md
-
curl -L -o README.md https://huggingface.co/spaces/lsmpp/PixText-Studio/resolve/main/README.md
2.23 kB
| title: PixText Studio | |
| emoji: ✍️ | |
| colorFrom: yellow | |
| colorTo: red | |
| sdk: gradio | |
| sdk_version: 6.30.0 | |
| python_version: 3.12 | |
| app_file: space.py | |
| license: apache-2.0 | |
| models: | |
| - ATH-MaaS/PixText | |
| # PixText Studio | |
| Detect text, adjust its boxes, enter the text you want, and compare the repaired regions. CRAFT locates the text and PP-OCRv6 reads it. Chinese uses individual character boxes; English stays in word boxes. | |
| Upload an image or choose the English and Chinese examples. Select only the regions you want to repair. You can move or resize any box, or draw a new one. MeanFlow defaults to four steps; Teacher defaults to 25. The result includes an image slider, matching region crops, a PNG download and editable region JSON. | |
| ## Run | |
| Deploy this directory as a Gradio Space with ZeroGPU, or run locally on an Ampere-or-newer CUDA GPU: | |
| ```sh | |
| python -m pip install -r requirements.txt | |
| python space.py | |
| ``` | |
| Model packages download from [ATH-MaaS/PixText](https://huggingface.co/ATH-MaaS/PixText) when first used. The optional OCR files download on the first detection run and are checked against release SHA-256 hashes. For an existing installation, set `PIXTEXT_MODEL_ROOT` to the directory containing the `PixText-MeanFlow` and `PixText-Teacher` packages and `PIXTEXT_OCR_ROOT` to the OCR model directory. Both variables are optional. | |
| Jobs are queued one at a time. Images are stored in isolated temporary sessions and removed after one hour of inactivity, when the next session is created. Nothing is uploaded to a dataset or sent to an external inference service. | |
| The vendored inference code is from [PixText commit 7779419](https://github.com/yaoliliu/PixText/tree/7779419de634d9785ec23558942480db713f0f99). Model packages retain their manifests, font notices and SHA-256 checks. CRAFT weights come from [EasyOCR](https://github.com/JaidedAI/EasyOCR); recognition weights and configuration come from [PaddlePaddle](https://huggingface.co/PaddlePaddle/PP-OCRv6_medium_rec_onnx). | |
| The Space uses Gradio Server to serve the custom editor and queue GPU requests. On ZeroGPU, PyTorch SDPA uses the original PixText token-routing mask without runtime compilation. A Dockerfile is also included for dedicated GPU hosting. | |