Spaces:
Running on Zero
Running on Zero
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: 🚀
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: blue
|
|
@@ -8,7 +8,32 @@ sdk_version: 6.13.0
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
-
short_description:
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Fast Image Studio
|
| 3 |
emoji: 🚀
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: blue
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
+
short_description: fast image editing using FireRed Image Edit and gr.Server
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Studio 01 — Image Edit
|
| 15 |
+
|
| 16 |
+
A custom-frontend image editing demo powered by [FireRed-Image-Edit 1.1](https://huggingface.co/FireRedTeam/FireRed-Image-Edit-1.1) and [`gr.Server`](https://www.gradio.app/main/docs/gradio/server) on free ZeroGPU.
|
| 17 |
+
|
| 18 |
+
The Python backend exposes a single queued endpoint (`/edit_image`) and serves a hand-authored HTML/CSS/JS page at `/`. The same endpoint is also reachable via `gradio_client` and as an MCP tool.
|
| 19 |
+
|
| 20 |
+
## Files
|
| 21 |
+
|
| 22 |
+
- `app.py` — `gr.Server` backend with a single `@server.api` route and a homepage route.
|
| 23 |
+
- `index.html` — custom frontend, calls the backend through `@gradio/client`.
|
| 24 |
+
- `qwenimage/` — pipeline modules (copy from the upstream FireRed-Image-Edit-1.0-Fast Space).
|
| 25 |
+
- `requirements.txt` — Python deps.
|
| 26 |
+
|
| 27 |
+
## Calling from Python
|
| 28 |
+
|
| 29 |
+
```python
|
| 30 |
+
from gradio_client import Client, handle_file
|
| 31 |
+
|
| 32 |
+
client = Client("ysharma/firered-server-studio") # your Space ID
|
| 33 |
+
result = client.predict(
|
| 34 |
+
image=handle_file("photo.jpg"),
|
| 35 |
+
prompt="Convert it to black and white with subtle film grain.",
|
| 36 |
+
api_name="/edit_image",
|
| 37 |
+
)
|
| 38 |
+
print(result["image"]["url"], result["seed"])
|
| 39 |
+
```
|