Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -188,7 +188,7 @@ def generate_image_handler(x, negative_prompt, fine_edge, fix_perspective, grow_
|
|
| 188 |
# 2. Instantiate a client specifically for this request with the forwarded headers.
|
| 189 |
# This ensures the backend sees the 'x-zerogpu-token' of the user, not the server.
|
| 190 |
# gradio_client caches schemas, so re-init is relatively cheap but necessary for headers.
|
| 191 |
-
client = Client(BACKEND_URL)
|
| 192 |
|
| 193 |
# Call the backend API
|
| 194 |
res_base64 = client.predict(
|
|
@@ -222,7 +222,7 @@ def generate_image_handler(x, negative_prompt, fine_edge, fix_perspective, grow_
|
|
| 222 |
|
| 223 |
# --- Gradio UI ---
|
| 224 |
|
| 225 |
-
with gr.Blocks(title="MagicQuill V2"
|
| 226 |
with gr.Row(elem_classes="row"):
|
| 227 |
text = gr.Markdown(
|
| 228 |
"""
|
|
|
|
| 188 |
# 2. Instantiate a client specifically for this request with the forwarded headers.
|
| 189 |
# This ensures the backend sees the 'x-zerogpu-token' of the user, not the server.
|
| 190 |
# gradio_client caches schemas, so re-init is relatively cheap but necessary for headers.
|
| 191 |
+
client = Client(BACKEND_URL, headers=forward_headers)
|
| 192 |
|
| 193 |
# Call the backend API
|
| 194 |
res_base64 = client.predict(
|
|
|
|
| 222 |
|
| 223 |
# --- Gradio UI ---
|
| 224 |
|
| 225 |
+
with gr.Blocks(title="MagicQuill V2") as demo:
|
| 226 |
with gr.Row(elem_classes="row"):
|
| 227 |
text = gr.Markdown(
|
| 228 |
"""
|