bruceyyu commited on
Commit
aab4ba6
·
verified ·
1 Parent(s): 1f22013

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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", head=zerogpu_fix_js) as demo:
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
  """