Spaces:
Running
Running
Fix engraving: force hf-inference provider for instruct-pix2pix
Browse files
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;
|
| 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 |
"""
|