hmb HF Staff commited on
Commit
4e42a83
Β·
1 Parent(s): 7d01652

Fix engraving: force hf-inference provider for instruct-pix2pix

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -47,7 +47,7 @@ def stylize(img, style, hex_color):
47
  if style in ("engraving", "engraving ✦"):
48
  if HF_TOKEN:
49
  try:
50
- client = InferenceClient(token=HF_TOKEN)
51
  result = client.image_to_image(
52
  img,
53
  prompt="vintage postage stamp intaglio engraving, fine crosshatch etching, monochrome ink illustration",
@@ -306,7 +306,6 @@ body, .gradio-container, .main { background: #F7F0E6 !important; }
306
  footer { display: none !important; }
307
  .gradio-container { max-width: 1080px !important; margin: 0 auto !important; padding: 0 !important; }
308
  #controls-col { overflow: visible !important; }
309
- #controls-col [data-testid="image"] { margin-top: 36px !important; }
310
 
311
  /* ─── Blocks / panels ─── */
312
  .block, .form {
@@ -596,7 +595,7 @@ SECTION_DIVIDER = """
596
  """
597
 
598
  CONTROLS_HEADER = """
599
- <div style="font-family:'Space Mono',monospace;font-size:.6rem;letter-spacing:.18em;text-transform:uppercase;color:#3D2E1E;margin-bottom:20px;">
600
  ── studio controls ──
601
  </div>
602
  """
 
47
  if style in ("engraving", "engraving ✦"):
48
  if HF_TOKEN:
49
  try:
50
+ client = InferenceClient(provider="hf-inference", token=HF_TOKEN)
51
  result = client.image_to_image(
52
  img,
53
  prompt="vintage postage stamp intaglio engraving, fine crosshatch etching, monochrome ink illustration",
 
306
  footer { display: none !important; }
307
  .gradio-container { max-width: 1080px !important; margin: 0 auto !important; padding: 0 !important; }
308
  #controls-col { overflow: visible !important; }
 
309
 
310
  /* ─── Blocks / panels ─── */
311
  .block, .form {
 
595
  """
596
 
597
  CONTROLS_HEADER = """
598
+ <div style="position:relative;z-index:10;display:inline-block;background:#F7F0E6;padding:0 8px 0 0;font-family:'Space Mono',monospace;font-size:.6rem;letter-spacing:.18em;text-transform:uppercase;color:#3D2E1E;">
599
  ── studio controls ──
600
  </div>
601
  """