Spaces:
Sleeping
Sleeping
github-actions[bot]
commited on
Commit
·
8cf0170
1
Parent(s):
3c090ce
Deploy from GitHub - 2026-01-21 22:53:39
Browse files
app.py
CHANGED
|
@@ -186,6 +186,11 @@ STYLES = {
|
|
| 186 |
'mosaic': 'Mosaic',
|
| 187 |
'rain_princess': 'Rain Princess',
|
| 188 |
'udnie': 'Udnie',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
}
|
| 190 |
|
| 191 |
STYLE_DESCRIPTIONS = {
|
|
@@ -193,6 +198,11 @@ STYLE_DESCRIPTIONS = {
|
|
| 193 |
'mosaic': 'Fragmented, tile-like artistic reconstruction',
|
| 194 |
'rain_princess': 'Moody, impressionistic with subtle textures',
|
| 195 |
'udnie': 'Bold, abstract expressionist style',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
}
|
| 197 |
|
| 198 |
# Backend options
|
|
@@ -620,6 +630,11 @@ def get_model_path(style: str) -> Path:
|
|
| 620 |
'mosaic': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/mosaic.pth',
|
| 621 |
'udnie': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/udnie.pth',
|
| 622 |
'rain_princess': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/rain-princess.pth',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 623 |
}
|
| 624 |
|
| 625 |
if style not in url_map:
|
|
@@ -1893,15 +1908,15 @@ custom_css = """
|
|
| 1893 |
Gradio 5.x Compatible
|
| 1894 |
============================================ */
|
| 1895 |
|
| 1896 |
-
/* Import Google Fonts */
|
| 1897 |
-
@import url('https://fonts.googleapis.com/css2?family=
|
| 1898 |
|
| 1899 |
/* Animated gradient background */
|
| 1900 |
body {
|
| 1901 |
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
|
| 1902 |
background-size: 400% 400%;
|
| 1903 |
animation: gradientBG 15s ease infinite;
|
| 1904 |
-
font-family: '
|
| 1905 |
min-height: 100vh;
|
| 1906 |
}
|
| 1907 |
|
|
@@ -1913,7 +1928,7 @@ body {
|
|
| 1913 |
|
| 1914 |
/* Universal font application */
|
| 1915 |
* {
|
| 1916 |
-
font-family: '
|
| 1917 |
}
|
| 1918 |
|
| 1919 |
/* Ensure text elements are visible */
|
|
@@ -1934,7 +1949,7 @@ h1, h2, h3, h4, h5, h6, p, span, div, label, button, input, textarea, select {
|
|
| 1934 |
padding: 24px !important;
|
| 1935 |
}
|
| 1936 |
|
| 1937 |
-
/* Primary button - enhanced glass effect with
|
| 1938 |
button.primary,
|
| 1939 |
.gr-button-primary,
|
| 1940 |
[class*="primary"] {
|
|
@@ -1946,8 +1961,10 @@ button.primary,
|
|
| 1946 |
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
| 1947 |
border: 1px solid rgba(255, 255, 255, 0.4) !important;
|
| 1948 |
color: #4F46E5 !important;
|
| 1949 |
-
font-
|
| 1950 |
-
|
|
|
|
|
|
|
| 1951 |
padding: 16px 32px !important;
|
| 1952 |
transition: all 0.3s ease !important;
|
| 1953 |
box-shadow:
|
|
@@ -1957,7 +1974,7 @@ button.primary,
|
|
| 1957 |
position: relative;
|
| 1958 |
overflow: hidden;
|
| 1959 |
width: 100% !important;
|
| 1960 |
-
min-height:
|
| 1961 |
}
|
| 1962 |
|
| 1963 |
button.primary::before,
|
|
@@ -2006,7 +2023,7 @@ button.primary:active,
|
|
| 2006 |
inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
|
| 2007 |
}
|
| 2008 |
|
| 2009 |
-
/* Secondary button - enhanced glass style */
|
| 2010 |
button.secondary,
|
| 2011 |
.gr-button-secondary,
|
| 2012 |
.download,
|
|
@@ -2018,16 +2035,18 @@ button.secondary,
|
|
| 2018 |
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
| 2019 |
border: 1px solid rgba(255, 255, 255, 0.5) !important;
|
| 2020 |
color: #374151 !important;
|
| 2021 |
-
|
|
|
|
| 2022 |
padding: 14px 28px !important;
|
| 2023 |
transition: all 0.3s ease !important;
|
| 2024 |
-
font-weight:
|
|
|
|
| 2025 |
box-shadow:
|
| 2026 |
0 8px 32px rgba(31, 38, 135, 0.12),
|
| 2027 |
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
| 2028 |
inset 0 -1px 0 rgba(0, 0, 0, 0.03) !important;
|
| 2029 |
width: 100% !important;
|
| 2030 |
-
min-height:
|
| 2031 |
}
|
| 2032 |
|
| 2033 |
button.secondary:hover,
|
|
@@ -2044,10 +2063,11 @@ button.secondary:hover,
|
|
| 2044 |
transform: translateY(-1px);
|
| 2045 |
}
|
| 2046 |
|
| 2047 |
-
/* All buttons -
|
| 2048 |
button,
|
| 2049 |
.gr-button {
|
| 2050 |
-
|
|
|
|
| 2051 |
transition: all 0.3s ease !important;
|
| 2052 |
width: 100% !important;
|
| 2053 |
}
|
|
@@ -2185,20 +2205,28 @@ input[type="radio"] {
|
|
| 2185 |
border: 1px solid rgba(255, 255, 255, 0.3);
|
| 2186 |
}
|
| 2187 |
|
| 2188 |
-
/* Markdown content */
|
| 2189 |
.markdown {
|
| 2190 |
color: #374151 !important;
|
|
|
|
| 2191 |
}
|
| 2192 |
|
| 2193 |
-
/*
|
| 2194 |
-
.gradio-container,
|
| 2195 |
-
.gradio-container *,
|
| 2196 |
.gradio-container h1,
|
| 2197 |
.gradio-container h2,
|
| 2198 |
.gradio-container h3,
|
| 2199 |
.gradio-container h4,
|
| 2200 |
.gradio-container h5,
|
| 2201 |
-
.gradio-container h6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2202 |
.gradio-container p,
|
| 2203 |
.gradio-container span,
|
| 2204 |
.gradio-container label {
|
|
@@ -2211,23 +2239,26 @@ button,
|
|
| 2211 |
color: inherit !important;
|
| 2212 |
}
|
| 2213 |
|
| 2214 |
-
/* Input and select text colors */
|
| 2215 |
input,
|
| 2216 |
textarea,
|
| 2217 |
select {
|
| 2218 |
color: #1F2937 !important;
|
|
|
|
| 2219 |
}
|
| 2220 |
|
| 2221 |
-
/* Label colors */
|
| 2222 |
label,
|
| 2223 |
[class*="label"] {
|
| 2224 |
color: #374151 !important;
|
|
|
|
| 2225 |
font-weight: 500 !important;
|
|
|
|
| 2226 |
}
|
| 2227 |
|
| 2228 |
/* Gradio 5.x specific text elements */
|
| 2229 |
.svelte-*, [class*="svelte-"] {
|
| 2230 |
-
font-family: '
|
| 2231 |
}
|
| 2232 |
|
| 2233 |
/* Group/Row/Column containers */
|
|
@@ -2345,7 +2376,7 @@ with gr.Blocks(
|
|
| 2345 |
theme=gr.themes.Glass(
|
| 2346 |
primary_hue="indigo",
|
| 2347 |
secondary_hue="purple",
|
| 2348 |
-
font=gr.themes.GoogleFont("
|
| 2349 |
radius_size="lg",
|
| 2350 |
),
|
| 2351 |
css=custom_css,
|
|
@@ -2355,21 +2386,21 @@ with gr.Blocks(
|
|
| 2355 |
gr.HTML("""
|
| 2356 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 2357 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 2358 |
-
<link href="https://fonts.googleapis.com/css2?family=
|
| 2359 |
""")
|
| 2360 |
|
| 2361 |
# Header with Portal-style hero section
|
| 2362 |
cuda_badge = f"<span class='backend-badge'>CUDA Accelerated</span>" if CUDA_KERNELS_AVAILABLE else ""
|
| 2363 |
gr.HTML(f"""
|
| 2364 |
-
<div style="text-align: center; padding: 3rem 0 2rem 0; font-family: '
|
| 2365 |
-
<h1 style="font-family: '
|
| 2366 |
StyleForge
|
| 2367 |
</h1>
|
| 2368 |
-
<p style="font-family: '
|
| 2369 |
Neural Style Transfer with Custom CUDA Kernels
|
| 2370 |
</p>
|
| 2371 |
{cuda_badge}
|
| 2372 |
-
<p style="font-family: '
|
| 2373 |
Custom Styles • Region Transfer • Style Blending • Real-time Processing
|
| 2374 |
</p>
|
| 2375 |
</div>
|
|
@@ -2793,29 +2824,49 @@ with gr.Blocks(
|
|
| 2793 |
[example_img, "mosaic", "auto", 70, False, False],
|
| 2794 |
[example_img, "rain_princess", "auto", 70, True, False],
|
| 2795 |
[example_img, "udnie", "auto", 70, False, False],
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2796 |
],
|
| 2797 |
inputs=[quick_image, quick_style, quick_backend, quick_intensity, quick_compare, quick_watermark],
|
| 2798 |
label="Style Presets (click to load)"
|
| 2799 |
)
|
| 2800 |
|
| 2801 |
-
# Display example style gallery
|
| 2802 |
gr.Markdown("""
|
| 2803 |
-
<div style="display: flex; gap:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2804 |
<div style="text-align: center;">
|
| 2805 |
-
<div style="width:
|
| 2806 |
-
<p style="margin-top: 0.5rem; font-size: 0.
|
| 2807 |
</div>
|
| 2808 |
<div style="text-align: center;">
|
| 2809 |
-
<div style="width:
|
| 2810 |
-
<p style="margin-top: 0.5rem; font-size: 0.
|
| 2811 |
</div>
|
| 2812 |
<div style="text-align: center;">
|
| 2813 |
-
<div style="width:
|
| 2814 |
-
<p style="margin-top: 0.5rem; font-size: 0.
|
| 2815 |
</div>
|
| 2816 |
<div style="text-align: center;">
|
| 2817 |
-
<div style="width:
|
| 2818 |
-
<p style="margin-top: 0.5rem; font-size: 0.
|
| 2819 |
</div>
|
| 2820 |
</div>
|
| 2821 |
""")
|
|
|
|
| 186 |
'mosaic': 'Mosaic',
|
| 187 |
'rain_princess': 'Rain Princess',
|
| 188 |
'udnie': 'Udnie',
|
| 189 |
+
'la_muse': 'La Muse',
|
| 190 |
+
'starry_night': 'Starry Night',
|
| 191 |
+
'the_scream': 'The Scream',
|
| 192 |
+
'feathers': 'Feathers',
|
| 193 |
+
'composition_vii': 'Composition VII',
|
| 194 |
}
|
| 195 |
|
| 196 |
STYLE_DESCRIPTIONS = {
|
|
|
|
| 198 |
'mosaic': 'Fragmented, tile-like artistic reconstruction',
|
| 199 |
'rain_princess': 'Moody, impressionistic with subtle textures',
|
| 200 |
'udnie': 'Bold, abstract expressionist style',
|
| 201 |
+
'la_muse': 'Romantic, soft colors with gentle brushstrokes',
|
| 202 |
+
'starry_night': 'Inspired by Van Gogh\'s iconic swirling masterpiece',
|
| 203 |
+
'the_scream': 'Edvard Munch\'s anxious expressionist style',
|
| 204 |
+
'feathers': 'Soft, delicate textures with flowing patterns',
|
| 205 |
+
'composition_vii': 'Kandinsky-inspired abstract geometric forms',
|
| 206 |
}
|
| 207 |
|
| 208 |
# Backend options
|
|
|
|
| 630 |
'mosaic': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/mosaic.pth',
|
| 631 |
'udnie': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/udnie.pth',
|
| 632 |
'rain_princess': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/rain-princess.pth',
|
| 633 |
+
'la_muse': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/la-muse.pth',
|
| 634 |
+
'starry_night': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/starry-night.pth',
|
| 635 |
+
'the_scream': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/the-scream.pth',
|
| 636 |
+
'feathers': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/feathers.pth',
|
| 637 |
+
'composition_vii': 'https://github.com/yakhyo/fast-neural-style-transfer/releases/download/v1.0/composition-vii.pth',
|
| 638 |
}
|
| 639 |
|
| 640 |
if style not in url_map:
|
|
|
|
| 1908 |
Gradio 5.x Compatible
|
| 1909 |
============================================ */
|
| 1910 |
|
| 1911 |
+
/* Import Google Fonts - Plus Jakarta Sans for premium Framer-style look */
|
| 1912 |
+
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&display=swap');
|
| 1913 |
|
| 1914 |
/* Animated gradient background */
|
| 1915 |
body {
|
| 1916 |
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
|
| 1917 |
background-size: 400% 400%;
|
| 1918 |
animation: gradientBG 15s ease infinite;
|
| 1919 |
+
font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
|
| 1920 |
min-height: 100vh;
|
| 1921 |
}
|
| 1922 |
|
|
|
|
| 1928 |
|
| 1929 |
/* Universal font application */
|
| 1930 |
* {
|
| 1931 |
+
font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
|
| 1932 |
}
|
| 1933 |
|
| 1934 |
/* Ensure text elements are visible */
|
|
|
|
| 1949 |
padding: 24px !important;
|
| 1950 |
}
|
| 1951 |
|
| 1952 |
+
/* Primary button - enhanced glass effect with Framer-style typography */
|
| 1953 |
button.primary,
|
| 1954 |
.gr-button-primary,
|
| 1955 |
[class*="primary"] {
|
|
|
|
| 1961 |
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
| 1962 |
border: 1px solid rgba(255, 255, 255, 0.4) !important;
|
| 1963 |
color: #4F46E5 !important;
|
| 1964 |
+
font-family: 'Plus Jakarta Sans', sans-serif !important;
|
| 1965 |
+
font-weight: 600 !important;
|
| 1966 |
+
letter-spacing: -0.01em !important;
|
| 1967 |
+
border-radius: 16px !important;
|
| 1968 |
padding: 16px 32px !important;
|
| 1969 |
transition: all 0.3s ease !important;
|
| 1970 |
box-shadow:
|
|
|
|
| 1974 |
position: relative;
|
| 1975 |
overflow: hidden;
|
| 1976 |
width: 100% !important;
|
| 1977 |
+
min-height: 52px !important;
|
| 1978 |
}
|
| 1979 |
|
| 1980 |
button.primary::before,
|
|
|
|
| 2023 |
inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
|
| 2024 |
}
|
| 2025 |
|
| 2026 |
+
/* Secondary button - enhanced glass style with Framer typography */
|
| 2027 |
button.secondary,
|
| 2028 |
.gr-button-secondary,
|
| 2029 |
.download,
|
|
|
|
| 2035 |
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
| 2036 |
border: 1px solid rgba(255, 255, 255, 0.5) !important;
|
| 2037 |
color: #374151 !important;
|
| 2038 |
+
font-family: 'Plus Jakarta Sans', sans-serif !important;
|
| 2039 |
+
border-radius: 14px !important;
|
| 2040 |
padding: 14px 28px !important;
|
| 2041 |
transition: all 0.3s ease !important;
|
| 2042 |
+
font-weight: 500 !important;
|
| 2043 |
+
letter-spacing: -0.005em !important;
|
| 2044 |
box-shadow:
|
| 2045 |
0 8px 32px rgba(31, 38, 135, 0.12),
|
| 2046 |
inset 0 1px 0 rgba(255, 255, 255, 0.6),
|
| 2047 |
inset 0 -1px 0 rgba(0, 0, 0, 0.03) !important;
|
| 2048 |
width: 100% !important;
|
| 2049 |
+
min-height: 48px !important;
|
| 2050 |
}
|
| 2051 |
|
| 2052 |
button.secondary:hover,
|
|
|
|
| 2063 |
transform: translateY(-1px);
|
| 2064 |
}
|
| 2065 |
|
| 2066 |
+
/* All buttons - Framer-style rounded corners and typography */
|
| 2067 |
button,
|
| 2068 |
.gr-button {
|
| 2069 |
+
font-family: 'Plus Jakarta Sans', sans-serif !important;
|
| 2070 |
+
border-radius: 14px !important;
|
| 2071 |
transition: all 0.3s ease !important;
|
| 2072 |
width: 100% !important;
|
| 2073 |
}
|
|
|
|
| 2205 |
border: 1px solid rgba(255, 255, 255, 0.3);
|
| 2206 |
}
|
| 2207 |
|
| 2208 |
+
/* Markdown content with Framer-style typography */
|
| 2209 |
.markdown {
|
| 2210 |
color: #374151 !important;
|
| 2211 |
+
font-family: 'Plus Jakarta Sans', sans-serif !important;
|
| 2212 |
}
|
| 2213 |
|
| 2214 |
+
/* Headings with Framer-style typography - tighter letter spacing */
|
|
|
|
|
|
|
| 2215 |
.gradio-container h1,
|
| 2216 |
.gradio-container h2,
|
| 2217 |
.gradio-container h3,
|
| 2218 |
.gradio-container h4,
|
| 2219 |
.gradio-container h5,
|
| 2220 |
+
.gradio-container h6 {
|
| 2221 |
+
font-family: 'Plus Jakarta Sans', sans-serif !important;
|
| 2222 |
+
color: #1F2937 !important;
|
| 2223 |
+
letter-spacing: -0.025em !important;
|
| 2224 |
+
font-weight: 600 !important;
|
| 2225 |
+
}
|
| 2226 |
+
|
| 2227 |
+
/* Text visibility fixes */
|
| 2228 |
+
.gradio-container,
|
| 2229 |
+
.gradio-container *,
|
| 2230 |
.gradio-container p,
|
| 2231 |
.gradio-container span,
|
| 2232 |
.gradio-container label {
|
|
|
|
| 2239 |
color: inherit !important;
|
| 2240 |
}
|
| 2241 |
|
| 2242 |
+
/* Input and select text colors with Framer-style typography */
|
| 2243 |
input,
|
| 2244 |
textarea,
|
| 2245 |
select {
|
| 2246 |
color: #1F2937 !important;
|
| 2247 |
+
font-family: 'Plus Jakarta Sans', sans-serif !important;
|
| 2248 |
}
|
| 2249 |
|
| 2250 |
+
/* Label colors with Framer-style typography */
|
| 2251 |
label,
|
| 2252 |
[class*="label"] {
|
| 2253 |
color: #374151 !important;
|
| 2254 |
+
font-family: 'Plus Jakarta Sans', sans-serif !important;
|
| 2255 |
font-weight: 500 !important;
|
| 2256 |
+
letter-spacing: -0.01em !important;
|
| 2257 |
}
|
| 2258 |
|
| 2259 |
/* Gradio 5.x specific text elements */
|
| 2260 |
.svelte-*, [class*="svelte-"] {
|
| 2261 |
+
font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
|
| 2262 |
}
|
| 2263 |
|
| 2264 |
/* Group/Row/Column containers */
|
|
|
|
| 2376 |
theme=gr.themes.Glass(
|
| 2377 |
primary_hue="indigo",
|
| 2378 |
secondary_hue="purple",
|
| 2379 |
+
font=gr.themes.GoogleFont("Plus Jakarta Sans"),
|
| 2380 |
radius_size="lg",
|
| 2381 |
),
|
| 2382 |
css=custom_css,
|
|
|
|
| 2386 |
gr.HTML("""
|
| 2387 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 2388 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 2389 |
+
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&display=swap" rel="stylesheet">
|
| 2390 |
""")
|
| 2391 |
|
| 2392 |
# Header with Portal-style hero section
|
| 2393 |
cuda_badge = f"<span class='backend-badge'>CUDA Accelerated</span>" if CUDA_KERNELS_AVAILABLE else ""
|
| 2394 |
gr.HTML(f"""
|
| 2395 |
+
<div style="text-align: center; padding: 3rem 0 2rem 0; font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
|
| 2396 |
+
<h1 style="font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 3.5rem; margin-bottom: 0.5rem; background: linear-gradient(135deg, #6366F1, #8B5CF6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; letter-spacing: -0.02em;">
|
| 2397 |
StyleForge
|
| 2398 |
</h1>
|
| 2399 |
+
<p style="font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #6B7280; font-size: 1.15rem; margin-bottom: 1rem; font-weight: 400;">
|
| 2400 |
Neural Style Transfer with Custom CUDA Kernels
|
| 2401 |
</p>
|
| 2402 |
{cuda_badge}
|
| 2403 |
+
<p style="font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #9CA3AF; margin-top: 1rem; font-size: 0.95rem; font-weight: 300;">
|
| 2404 |
Custom Styles • Region Transfer • Style Blending • Real-time Processing
|
| 2405 |
</p>
|
| 2406 |
</div>
|
|
|
|
| 2824 |
[example_img, "mosaic", "auto", 70, False, False],
|
| 2825 |
[example_img, "rain_princess", "auto", 70, True, False],
|
| 2826 |
[example_img, "udnie", "auto", 70, False, False],
|
| 2827 |
+
[example_img, "starry_night", "auto", 70, False, False],
|
| 2828 |
+
[example_img, "la_muse", "auto", 70, False, False],
|
| 2829 |
+
[example_img, "the_scream", "auto", 70, False, False],
|
| 2830 |
+
[example_img, "composition_vii", "auto", 70, False, False],
|
| 2831 |
],
|
| 2832 |
inputs=[quick_image, quick_style, quick_backend, quick_intensity, quick_compare, quick_watermark],
|
| 2833 |
label="Style Presets (click to load)"
|
| 2834 |
)
|
| 2835 |
|
| 2836 |
+
# Display example style gallery with unique gradients for each style
|
| 2837 |
gr.Markdown("""
|
| 2838 |
+
<div style="display: flex; gap: 0.8rem; justify-content: center; margin: 1rem 0; flex-wrap: wrap;">
|
| 2839 |
+
<div style="text-align: center;">
|
| 2840 |
+
<div style="width: 100px; height: 100px; background: linear-gradient(135deg, #ff6b6b, #feca57); border-radius: 12px; margin: 0 auto; box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);"></div>
|
| 2841 |
+
<p style="margin-top: 0.5rem; font-size: 0.8rem; font-weight: 500;">🍬 Candy</p>
|
| 2842 |
+
</div>
|
| 2843 |
+
<div style="text-align: center;">
|
| 2844 |
+
<div style="width: 100px; height: 100px; background: linear-gradient(135deg, #5f27cd, #00d2d3); border-radius: 12px; margin: 0 auto; box-shadow: 0 4px 15px rgba(95, 39, 205, 0.3);"></div>
|
| 2845 |
+
<p style="margin-top: 0.5rem; font-size: 0.8rem; font-weight: 500;">🎨 Mosaic</p>
|
| 2846 |
+
</div>
|
| 2847 |
+
<div style="text-align: center;">
|
| 2848 |
+
<div style="width: 100px; height: 100px; background: linear-gradient(135deg, #576574, #c8d6e5); border-radius: 12px; margin: 0 auto; box-shadow: 0 4px 15px rgba(87, 101, 116, 0.3);"></div>
|
| 2849 |
+
<p style="margin-top: 0.5rem; font-size: 0.8rem; font-weight: 500;">🌧️ Rain Princess</p>
|
| 2850 |
+
</div>
|
| 2851 |
+
<div style="text-align: center;">
|
| 2852 |
+
<div style="width: 100px; height: 100px; background: linear-gradient(135deg, #ee5a24, #f9ca24); border-radius: 12px; margin: 0 auto; box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);"></div>
|
| 2853 |
+
<p style="margin-top: 0.5rem; font-size: 0.8rem; font-weight: 500;">🖼️ Udnie</p>
|
| 2854 |
+
</div>
|
| 2855 |
<div style="text-align: center;">
|
| 2856 |
+
<div style="width: 100px; height: 100px; background: linear-gradient(135deg, #1e3a8a, #fbbf24, #3b82f6); border-radius: 12px; margin: 0 auto; box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);"></div>
|
| 2857 |
+
<p style="margin-top: 0.5rem; font-size: 0.8rem; font-weight: 500;">🌃 Starry Night</p>
|
| 2858 |
</div>
|
| 2859 |
<div style="text-align: center;">
|
| 2860 |
+
<div style="width: 100px; height: 100px; background: linear-gradient(135deg, #be185d, #fce7f3, #9d174d); border-radius: 12px; margin: 0 auto; box-shadow: 0 4px 15px rgba(190, 24, 93, 0.3);"></div>
|
| 2861 |
+
<p style="margin-top: 0.5rem; font-size: 0.8rem; font-weight: 500;">🎭 La Muse</p>
|
| 2862 |
</div>
|
| 2863 |
<div style="text-align: center;">
|
| 2864 |
+
<div style="width: 100px; height: 100px; background: linear-gradient(135deg, #dc2626, #1f2937, #f97316); border-radius: 12px; margin: 0 auto; box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);"></div>
|
| 2865 |
+
<p style="margin-top: 0.5rem; font-size: 0.8rem; font-weight: 500;">😱 The Scream</p>
|
| 2866 |
</div>
|
| 2867 |
<div style="text-align: center;">
|
| 2868 |
+
<div style="width: 100px; height: 100px; background: linear-gradient(135deg, #7c3aed, #2563eb, #db2777); border-radius: 12px; margin: 0 auto; box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);"></div>
|
| 2869 |
+
<p style="margin-top: 0.5rem; font-size: 0.8rem; font-weight: 500;">🎪 Composition VII</p>
|
| 2870 |
</div>
|
| 2871 |
</div>
|
| 2872 |
""")
|