github-actions[bot] commited on
Commit
4264fdb
·
1 Parent(s): bd97d92

Deploy from GitHub - 2026-01-21 20:22:15

Browse files
Files changed (1) hide show
  1. app.py +229 -177
app.py CHANGED
@@ -1842,22 +1842,17 @@ else:
1842
 
1843
  custom_css = """
1844
  /* ============================================
1845
- FLOWLINE-INSPIRED MINIMAL THEME
1846
- Clean, modern, refined
1847
  Gradio 5.x Compatible
1848
  ============================================ */
1849
 
1850
- /* Import fonts - Inter for UI, plus a distinctive display font */
1851
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');
1852
-
1853
  /* Animated gradient background */
1854
  body {
1855
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
1856
  background-size: 400% 400%;
1857
  animation: gradientBG 15s ease infinite;
1858
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
1859
  min-height: 100vh;
1860
- color: #09090B;
1861
  }
1862
 
1863
  @keyframes gradientBG {
@@ -1868,118 +1863,181 @@ body {
1868
 
1869
  /* Universal font application */
1870
  * {
1871
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
1872
  }
1873
 
1874
- /* Headings use Space Grotesk for distinctive look */
1875
- h1, h2, h3, .gradio-container h1, .gradio-container h2, .gradio-container h3 {
1876
- font-family: 'Space Grotesk', sans-serif !important;
1877
  }
1878
 
1879
- /* Main app container - clean, minimal */
1880
  .gradio-container {
1881
- background: #FFFFFF !important;
1882
- border-radius: 12px;
1883
- border: 1px solid #E4E4E7;
1884
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
 
 
1885
  max-width: 1400px;
1886
- margin: 24px auto;
1887
- padding: 32px !important;
1888
  }
1889
 
1890
- /* Primary button - bigger with smooth hover animation */
1891
  button.primary,
1892
  .gr-button-primary,
1893
  [class*="primary"] {
1894
- background: #18181B !important;
1895
- border: 1px solid #18181B !important;
1896
- color: #FAFAFA !important;
1897
- font-weight: 600 !important;
1898
- font-size: 16px !important;
1899
- border-radius: 12px !important;
1900
- padding: 14px 28px !important;
1901
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
 
 
 
 
 
 
 
 
1902
  position: relative;
1903
  overflow: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1904
  }
1905
 
1906
  button.primary:hover,
1907
  .gr-button-primary:hover,
1908
  [class*="primary"]:hover {
1909
- background: #000000 !important;
1910
- border-color: #000000 !important;
1911
  transform: translateY(-2px);
1912
- box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
 
 
 
 
 
 
 
 
1913
  }
1914
 
1915
  button.primary:active,
1916
  .gr-button-primary:active,
1917
  [class*="primary"]:active {
1918
- transform: translateY(0) scale(0.98);
 
 
 
1919
  }
1920
 
1921
- /* Secondary button - bigger with hover animation */
1922
  button.secondary,
1923
  .gr-button-secondary,
1924
  .download,
1925
  [class*="secondary"] {
1926
- background: #FFFFFF !important;
1927
- border: 1px solid #E4E4E7 !important;
1928
- color: #18181B !important;
1929
- border-radius: 12px !important;
1930
- padding: 13px 24px !important;
1931
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
 
 
 
 
1932
  font-weight: 600 !important;
1933
- font-size: 15px !important;
 
 
 
 
 
1934
  }
1935
 
1936
  button.secondary:hover,
1937
  .gr-button-secondary:hover,
1938
  .download:hover,
1939
  [class*="secondary"]:hover {
1940
- background: #FAFAFA !important;
1941
- border-color: #18181B !important;
 
 
 
 
 
1942
  transform: translateY(-1px);
1943
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
1944
  }
1945
 
1946
- /* All buttons - bigger base size */
1947
- button {
1948
- border-radius: 10px !important;
1949
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
1950
- font-size: 15px !important;
1951
- font-weight: 600 !important;
1952
- padding: 12px 20px !important;
 
 
 
 
 
 
 
 
 
1953
  }
1954
 
1955
- /* Tabs - clean style */
1956
  .tabs {
1957
- background: #FAFAFA !important;
1958
- border-radius: 8px !important;
1959
- padding: 4px !important;
1960
- border: 1px solid #E4E4E7 !important;
 
1961
  }
1962
 
1963
  /* Tab buttons */
1964
  button.tab-item {
1965
  background: transparent !important;
1966
- border-radius: 6px !important;
1967
- color: #71717A !important;
1968
- font-size: 14px !important;
1969
- font-weight: 500 !important;
1970
- transition: all 0.15s ease !important;
1971
- padding: 8px 14px !important;
1972
  }
1973
 
1974
  button.tab-item:hover {
1975
- background: rgba(0, 0, 0, 0.04) !important;
1976
  }
1977
 
1978
  button.tab-item.selected {
1979
- background: #FFFFFF !important;
1980
- color: #18181B !important;
1981
- font-weight: 500 !important;
1982
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
1983
  }
1984
 
1985
  /* Input boxes and text areas */
@@ -1987,106 +2045,99 @@ input[type="text"],
1987
  input[type="number"],
1988
  textarea,
1989
  select {
1990
- background: #FFFFFF !important;
1991
- border: 1px solid #E4E4E7 !important;
1992
- border-radius: 8px !important;
1993
- transition: all 0.15s ease !important;
1994
- font-size: 14px !important;
1995
  }
1996
 
1997
  input[type="text"]:focus,
1998
  input[type="number"]:focus,
1999
  textarea:focus,
2000
  select:focus {
2001
- background: #FFFFFF !important;
2002
- border-color: #18181B !important;
 
2003
  outline: none !important;
2004
- box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05) !important;
2005
  }
2006
 
2007
- /* Image containers - clean border */
2008
  .image-container,
2009
  [class*="image"] {
2010
- border-radius: 8px !important;
2011
- border: 1px solid #E4E4E7 !important;
2012
  overflow: hidden !important;
2013
- background: #FAFAFA !important;
2014
  }
2015
 
2016
- /* Slider styling - bigger */
2017
  input[type="range"] {
2018
  -webkit-appearance: none;
2019
- background: #E4E4E7;
2020
- border-radius: 4px;
2021
- height: 6px;
2022
- border: none;
 
2023
  }
2024
 
2025
  input[type="range"]::-webkit-slider-thumb {
2026
  -webkit-appearance: none;
2027
- width: 20px;
2028
- height: 20px;
2029
- background: #18181B;
2030
- border: 3px solid #FFFFFF;
2031
  border-radius: 50%;
2032
  cursor: pointer;
2033
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
2034
- transition: transform 0.2s ease;
2035
- }
2036
-
2037
- input[type="range"]::-webkit-slider-thumb:hover {
2038
- transform: scale(1.1);
2039
  }
2040
 
2041
  input[type="range"]::-moz-range-thumb {
2042
- width: 20px;
2043
- height: 20px;
2044
- background: #18181B;
2045
- border: 3px solid #FFFFFF;
2046
  border-radius: 50%;
2047
  cursor: pointer;
2048
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
2049
- transition: transform 0.2s ease;
2050
- }
2051
-
2052
- input[type="range"]::-moz-range-thumb:hover {
2053
- transform: scale(1.1);
2054
  }
2055
 
2056
- /* Checkbox and radio styling - bigger */
2057
  input[type="checkbox"],
2058
  input[type="radio"] {
2059
- accent-color: #18181B !important;
2060
- width: 20px !important;
2061
- height: 20px !important;
2062
  }
2063
 
2064
- /* Badge styles - clean, minimal */
2065
  .live-badge {
2066
  display: inline-block;
2067
- padding: 4px 12px;
2068
- background: #FEF3C7;
 
2069
  color: #92400E;
2070
- border-radius: 6px;
2071
- font-size: 12px;
2072
- font-weight: 500;
2073
- border: 1px solid #FDE68A;
2074
  }
2075
 
2076
  .backend-badge {
2077
  display: inline-block;
2078
- padding: 4px 12px;
2079
- background: #D1FAE5;
 
2080
  color: #065F46;
2081
- border-radius: 6px;
2082
- font-size: 12px;
2083
- font-weight: 500;
2084
- border: 1px solid #A7F3D0;
2085
  }
2086
 
2087
  /* Markdown content */
2088
  .markdown {
2089
- color: #27272A !important;
2090
  }
2091
 
2092
  /* Text visibility fixes */
@@ -2101,7 +2152,7 @@ input[type="radio"] {
2101
  .gradio-container p,
2102
  .gradio-container span,
2103
  .gradio-container label {
2104
- color: #27272A !important;
2105
  }
2106
 
2107
  /* Button text colors */
@@ -2114,22 +2165,14 @@ button,
2114
  input,
2115
  textarea,
2116
  select {
2117
- color: #27272A !important;
2118
  }
2119
 
2120
- /* Label colors - bigger text */
2121
  label,
2122
  [class*="label"] {
2123
- color: #27272A !important;
2124
- font-weight: 600 !important;
2125
- font-size: 15px !important;
2126
- }
2127
-
2128
- /* General text size increase */
2129
- .gradio-container p,
2130
- .gradio-container span,
2131
- .gradio-container div {
2132
- font-size: 15px !important;
2133
  }
2134
 
2135
  /* Gradio 5.x specific text elements */
@@ -2141,76 +2184,79 @@ label,
2141
  .group,
2142
  .row,
2143
  .column {
2144
- background: transparent !important;
2145
- border-radius: 0 !important;
2146
- padding: 0 !important;
2147
  }
2148
 
2149
- /* Accordion - clean */
2150
  .details {
2151
- background: #FAFAFA !important;
2152
- border-radius: 8px !important;
2153
- border: 1px solid #E4E4E7 !important;
 
2154
  }
2155
 
2156
- /* Scrollbar - minimal */
2157
  ::-webkit-scrollbar {
2158
- width: 8px;
2159
- height: 8px;
2160
  }
2161
 
2162
  ::-webkit-scrollbar-track {
2163
- background: transparent;
 
2164
  }
2165
 
2166
  ::-webkit-scrollbar-thumb {
2167
- background: #D4D4D8;
2168
- border-radius: 3px;
 
2169
  }
2170
 
2171
  ::-webkit-scrollbar-thumb:hover {
2172
- background: #A1A1AA;
2173
  }
2174
 
2175
- /* Progress bar - minimal */
2176
  progress {
2177
- background: #E4E4E7 !important;
2178
- border-radius: 4px !important;
2179
- height: 4px !important;
2180
  }
2181
 
2182
  progress::-webkit-progress-bar {
2183
- background: #E4E4E7;
2184
- border-radius: 4px;
2185
  }
2186
 
2187
  progress::-webkit-progress-value {
2188
- background: #18181B !important;
2189
- border-radius: 4px;
2190
  }
2191
 
2192
  /* Mobile responsive */
2193
  @media (max-width: 768px) {
2194
  .gradio-container {
2195
- margin: 12px !important;
2196
- padding: 20px !important;
2197
- border-radius: 12px !important;
2198
  }
2199
 
2200
  button.primary,
2201
  .gr-button-primary,
2202
  [class*="primary"] {
2203
- padding: 9px 16px !important;
2204
  font-size: 14px !important;
2205
  }
2206
  }
2207
 
2208
- /* Loading spinner - minimal */
2209
  .spinner {
2210
- border: 2px solid #E4E4E7;
2211
- border-top: 2px solid #18181B;
2212
  border-radius: 50%;
2213
- animation: spin 0.8s linear infinite;
2214
  }
2215
 
2216
  @keyframes spin {
@@ -2222,18 +2268,19 @@ progress::-webkit-progress-value {
2222
  .gradio-button.primary,
2223
  button[class*="Primary"],
2224
  [type="button"].primary {
2225
- background: #18181B !important;
2226
- border: 1px solid #18181B !important;
2227
- color: #FAFAFA !important;
2228
- font-weight: 500 !important;
2229
- border-radius: 8px !important;
 
2230
  }
2231
 
2232
  /* Block containers */
2233
  .block {
2234
- background: transparent !important;
2235
- border-radius: 0 !important;
2236
- padding: 0 !important;
2237
  }
2238
 
2239
  /* Form elements */
@@ -2245,24 +2292,29 @@ button[class*="Primary"],
2245
 
2246
  with gr.Blocks(
2247
  title="StyleForge: Neural Style Transfer",
2248
- theme=gr.themes.Base(
 
 
2249
  font=gr.themes.GoogleFont("Inter"),
2250
- radius_size="sm",
2251
  ),
2252
  css=custom_css,
2253
  ) as demo:
2254
 
2255
- # Header - bigger text with Space Grotesk font
2256
  cuda_badge = f"<span class='backend-badge'>CUDA Accelerated</span>" if CUDA_KERNELS_AVAILABLE else ""
2257
  gr.Markdown(f"""
2258
- <div style="text-align: center; padding: 2.5rem 0 2rem 0;">
2259
- <h1 style="font-size: 3.5rem; margin-bottom: 0.5rem; color: #18181B; font-weight: 700; letter-spacing: -0.03em; font-family: 'Space Grotesk', sans-serif;">
2260
  StyleForge
2261
  </h1>
2262
- <p style="color: #71717A; font-size: 1.15rem; margin-bottom: 1rem; font-weight: 400; letter-spacing: -0.01em;">
2263
  Neural Style Transfer with Custom CUDA Kernels
2264
  </p>
2265
  {cuda_badge}
 
 
 
2266
  </div>
2267
  """)
2268
 
 
1842
 
1843
  custom_css = """
1844
  /* ============================================
1845
+ LIQUID GLASS / GLASSMORPHISM THEME
 
1846
  Gradio 5.x Compatible
1847
  ============================================ */
1848
 
 
 
 
1849
  /* Animated gradient background */
1850
  body {
1851
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
1852
  background-size: 400% 400%;
1853
  animation: gradientBG 15s ease infinite;
1854
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
1855
  min-height: 100vh;
 
1856
  }
1857
 
1858
  @keyframes gradientBG {
 
1863
 
1864
  /* Universal font application */
1865
  * {
1866
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
1867
  }
1868
 
1869
+ /* Ensure text elements are visible */
1870
+ h1, h2, h3, h4, h5, h6, p, span, div, label, button, input, textarea, select {
1871
+ color: inherit;
1872
  }
1873
 
1874
+ /* Main app container - glass effect */
1875
  .gradio-container {
1876
+ backdrop-filter: blur(20px) saturate(180%);
1877
+ -webkit-backdrop-filter: blur(20px) saturate(180%);
1878
+ background: rgba(255, 255, 255, 0.75) !important;
1879
+ border-radius: 24px;
1880
+ border: 1px solid rgba(255, 255, 255, 0.3);
1881
+ box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
1882
  max-width: 1400px;
1883
+ margin: 20px auto;
1884
+ padding: 24px !important;
1885
  }
1886
 
1887
+ /* Primary button - enhanced glass effect with full width */
1888
  button.primary,
1889
  .gr-button-primary,
1890
  [class*="primary"] {
1891
+ background: linear-gradient(135deg,
1892
+ rgba(255, 255, 255, 0.25) 0%,
1893
+ rgba(255, 255, 255, 0.1) 50%,
1894
+ rgba(255, 255, 255, 0.05) 100%) !important;
1895
+ backdrop-filter: blur(20px) saturate(180%);
1896
+ -webkit-backdrop-filter: blur(20px) saturate(180%);
1897
+ border: 1px solid rgba(255, 255, 255, 0.4) !important;
1898
+ color: #4F46E5 !important;
1899
+ font-weight: 700 !important;
1900
+ border-radius: 20px !important;
1901
+ padding: 16px 32px !important;
1902
+ transition: all 0.3s ease !important;
1903
+ box-shadow:
1904
+ 0 8px 32px rgba(31, 38, 135, 0.15),
1905
+ inset 0 1px 0 rgba(255, 255, 255, 0.5),
1906
+ inset 0 -1px 0 rgba(0, 0, 0, 0.05) !important;
1907
  position: relative;
1908
  overflow: hidden;
1909
+ width: 100% !important;
1910
+ min-height: 56px !important;
1911
+ }
1912
+
1913
+ button.primary::before,
1914
+ .gr-button-primary::before,
1915
+ [class*="primary"]::before {
1916
+ content: '';
1917
+ position: absolute;
1918
+ top: 0;
1919
+ left: -100%;
1920
+ width: 100%;
1921
+ height: 100%;
1922
+ background: linear-gradient(90deg,
1923
+ transparent,
1924
+ rgba(255, 255, 255, 0.4),
1925
+ transparent);
1926
+ transition: left 0.5s ease;
1927
+ }
1928
+
1929
+ button.primary:hover::before,
1930
+ .gr-button-primary:hover::before,
1931
+ [class*="primary"]:hover::before {
1932
+ left: 100%;
1933
  }
1934
 
1935
  button.primary:hover,
1936
  .gr-button-primary:hover,
1937
  [class*="primary"]:hover {
 
 
1938
  transform: translateY(-2px);
1939
+ background: linear-gradient(135deg,
1940
+ rgba(255, 255, 255, 0.35) 0%,
1941
+ rgba(255, 255, 255, 0.15) 50%,
1942
+ rgba(255, 255, 255, 0.1) 100%) !important;
1943
+ border-color: rgba(255, 255, 255, 0.6) !important;
1944
+ box-shadow:
1945
+ 0 12px 40px rgba(31, 38, 135, 0.25),
1946
+ inset 0 1px 0 rgba(255, 255, 255, 0.6),
1947
+ inset 0 -1px 0 rgba(0, 0, 0, 0.05) !important;
1948
  }
1949
 
1950
  button.primary:active,
1951
  .gr-button-primary:active,
1952
  [class*="primary"]:active {
1953
+ transform: translateY(0);
1954
+ box-shadow:
1955
+ 0 4px 20px rgba(31, 38, 135, 0.15),
1956
+ inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
1957
  }
1958
 
1959
+ /* Secondary button - enhanced glass style */
1960
  button.secondary,
1961
  .gr-button-secondary,
1962
  .download,
1963
  [class*="secondary"] {
1964
+ background: linear-gradient(135deg,
1965
+ rgba(255, 255, 255, 0.4) 0%,
1966
+ rgba(255, 255, 255, 0.2) 100%) !important;
1967
+ backdrop-filter: blur(20px) saturate(180%);
1968
+ -webkit-backdrop-filter: blur(20px) saturate(180%);
1969
+ border: 1px solid rgba(255, 255, 255, 0.5) !important;
1970
+ color: #374151 !important;
1971
+ border-radius: 20px !important;
1972
+ padding: 14px 28px !important;
1973
+ transition: all 0.3s ease !important;
1974
  font-weight: 600 !important;
1975
+ box-shadow:
1976
+ 0 8px 32px rgba(31, 38, 135, 0.12),
1977
+ inset 0 1px 0 rgba(255, 255, 255, 0.6),
1978
+ inset 0 -1px 0 rgba(0, 0, 0, 0.03) !important;
1979
+ width: 100% !important;
1980
+ min-height: 52px !important;
1981
  }
1982
 
1983
  button.secondary:hover,
1984
  .gr-button-secondary:hover,
1985
  .download:hover,
1986
  [class*="secondary"]:hover {
1987
+ background: linear-gradient(135deg,
1988
+ rgba(255, 255, 255, 0.6) 0%,
1989
+ rgba(255, 255, 255, 0.3) 100%) !important;
1990
+ border-color: rgba(255, 255, 255, 0.7) !important;
1991
+ box-shadow:
1992
+ 0 12px 40px rgba(31, 38, 135, 0.18),
1993
+ inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
1994
  transform: translateY(-1px);
 
1995
  }
1996
 
1997
+ /* All buttons - full width in containers */
1998
+ button,
1999
+ .gr-button {
2000
+ border-radius: 20px !important;
2001
+ transition: all 0.3s ease !important;
2002
+ width: 100% !important;
2003
+ }
2004
+
2005
+ /* Button containers - ensure buttons fill row */
2006
+ .gradio-container button,
2007
+ #quick_stylize button,
2008
+ #style_blending button,
2009
+ #region_transfer button,
2010
+ #custom_training button,
2011
+ #benchmarking button {
2012
+ width: 100% !important;
2013
  }
2014
 
2015
+ /* Tabs - glass style */
2016
  .tabs {
2017
+ background: rgba(255, 255, 255, 0.4) !important;
2018
+ backdrop-filter: blur(10px);
2019
+ border-radius: 16px !important;
2020
+ padding: 8px !important;
2021
+ border: 1px solid rgba(255, 255, 255, 0.3) !important;
2022
  }
2023
 
2024
  /* Tab buttons */
2025
  button.tab-item {
2026
  background: transparent !important;
2027
+ border-radius: 12px !important;
2028
+ color: #6B7280 !important;
2029
+ transition: all 0.3s ease !important;
 
 
 
2030
  }
2031
 
2032
  button.tab-item:hover {
2033
+ background: rgba(255, 255, 255, 0.5) !important;
2034
  }
2035
 
2036
  button.tab-item.selected {
2037
+ background: rgba(255, 255, 255, 0.8) !important;
2038
+ color: #6366F1 !important;
2039
+ font-weight: 600 !important;
2040
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
2041
  }
2042
 
2043
  /* Input boxes and text areas */
 
2045
  input[type="number"],
2046
  textarea,
2047
  select {
2048
+ background: rgba(255, 255, 255, 0.7) !important;
2049
+ backdrop-filter: blur(10px);
2050
+ border: 1px solid rgba(255, 255, 255, 0.5) !important;
2051
+ border-radius: 12px !important;
2052
+ transition: all 0.3s ease !important;
2053
  }
2054
 
2055
  input[type="text"]:focus,
2056
  input[type="number"]:focus,
2057
  textarea:focus,
2058
  select:focus {
2059
+ background: rgba(255, 255, 255, 0.9) !important;
2060
+ border-color: #6366F1 !important;
2061
+ box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
2062
  outline: none !important;
 
2063
  }
2064
 
2065
+ /* Image containers - glass frame */
2066
  .image-container,
2067
  [class*="image"] {
2068
+ border-radius: 16px !important;
2069
+ border: 1px solid rgba(255, 255, 255, 0.3) !important;
2070
  overflow: hidden !important;
2071
+ background: rgba(255, 255, 255, 0.3) !important;
2072
  }
2073
 
2074
+ /* Slider styling */
2075
  input[type="range"] {
2076
  -webkit-appearance: none;
2077
+ background: rgba(229, 231, 235, 0.6);
2078
+ backdrop-filter: blur(10px);
2079
+ border-radius: 8px;
2080
+ height: 8px;
2081
+ border: 1px solid rgba(255, 255, 255, 0.3);
2082
  }
2083
 
2084
  input[type="range"]::-webkit-slider-thumb {
2085
  -webkit-appearance: none;
2086
+ width: 22px;
2087
+ height: 22px;
2088
+ background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
2089
+ border: 3px solid white;
2090
  border-radius: 50%;
2091
  cursor: pointer;
2092
+ box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
 
 
 
 
 
2093
  }
2094
 
2095
  input[type="range"]::-moz-range-thumb {
2096
+ width: 22px;
2097
+ height: 22px;
2098
+ background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
2099
+ border: 3px solid white;
2100
  border-radius: 50%;
2101
  cursor: pointer;
2102
+ box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
 
 
 
 
 
2103
  }
2104
 
2105
+ /* Checkbox and radio styling */
2106
  input[type="checkbox"],
2107
  input[type="radio"] {
2108
+ accent-color: #6366F1 !important;
2109
+ width: 18px !important;
2110
+ height: 18px !important;
2111
  }
2112
 
2113
+ /* Badge styles */
2114
  .live-badge {
2115
  display: inline-block;
2116
+ padding: 6px 16px;
2117
+ background: rgba(254, 243, 199, 0.8);
2118
+ backdrop-filter: blur(10px);
2119
  color: #92400E;
2120
+ border-radius: 24px;
2121
+ font-size: 13px;
2122
+ font-weight: 600;
2123
+ border: 1px solid rgba(255, 255, 255, 0.3);
2124
  }
2125
 
2126
  .backend-badge {
2127
  display: inline-block;
2128
+ padding: 6px 16px;
2129
+ background: rgba(209, 250, 229, 0.8);
2130
+ backdrop-filter: blur(10px);
2131
  color: #065F46;
2132
+ border-radius: 24px;
2133
+ font-size: 13px;
2134
+ font-weight: 600;
2135
+ border: 1px solid rgba(255, 255, 255, 0.3);
2136
  }
2137
 
2138
  /* Markdown content */
2139
  .markdown {
2140
+ color: #374151 !important;
2141
  }
2142
 
2143
  /* Text visibility fixes */
 
2152
  .gradio-container p,
2153
  .gradio-container span,
2154
  .gradio-container label {
2155
+ color: #1F2937 !important;
2156
  }
2157
 
2158
  /* Button text colors */
 
2165
  input,
2166
  textarea,
2167
  select {
2168
+ color: #1F2937 !important;
2169
  }
2170
 
2171
+ /* Label colors */
2172
  label,
2173
  [class*="label"] {
2174
+ color: #374151 !important;
2175
+ font-weight: 500 !important;
 
 
 
 
 
 
 
 
2176
  }
2177
 
2178
  /* Gradio 5.x specific text elements */
 
2184
  .group,
2185
  .row,
2186
  .column {
2187
+ background: rgba(255, 255, 255, 0.3) !important;
2188
+ border-radius: 16px !important;
2189
+ padding: 16px !important;
2190
  }
2191
 
2192
+ /* Accordion */
2193
  .details {
2194
+ background: rgba(255, 255, 255, 0.4) !important;
2195
+ backdrop-filter: blur(10px);
2196
+ border-radius: 16px !important;
2197
+ border: 1px solid rgba(255, 255, 255, 0.3) !important;
2198
  }
2199
 
2200
+ /* Scrollbar - glass style */
2201
  ::-webkit-scrollbar {
2202
+ width: 10px;
2203
+ height: 10px;
2204
  }
2205
 
2206
  ::-webkit-scrollbar-track {
2207
+ background: rgba(229, 231, 235, 0.3);
2208
+ border-radius: 8px;
2209
  }
2210
 
2211
  ::-webkit-scrollbar-thumb {
2212
+ background: rgba(167, 139, 250, 0.5);
2213
+ border-radius: 8px;
2214
+ border: 2px solid rgba(255, 255, 255, 0.3);
2215
  }
2216
 
2217
  ::-webkit-scrollbar-thumb:hover {
2218
+ background: rgba(139, 92, 246, 0.7);
2219
  }
2220
 
2221
+ /* Progress bar */
2222
  progress {
2223
+ background: rgba(229, 231, 235, 0.5) !important;
2224
+ border-radius: 8px !important;
2225
+ height: 8px !important;
2226
  }
2227
 
2228
  progress::-webkit-progress-bar {
2229
+ background: rgba(229, 231, 235, 0.5);
2230
+ border-radius: 8px;
2231
  }
2232
 
2233
  progress::-webkit-progress-value {
2234
+ background: linear-gradient(90deg, #6366F1, #8B5CF6) !important;
2235
+ border-radius: 8px;
2236
  }
2237
 
2238
  /* Mobile responsive */
2239
  @media (max-width: 768px) {
2240
  .gradio-container {
2241
+ margin: 10px !important;
2242
+ padding: 16px !important;
2243
+ border-radius: 20px !important;
2244
  }
2245
 
2246
  button.primary,
2247
  .gr-button-primary,
2248
  [class*="primary"] {
2249
+ padding: 10px 18px !important;
2250
  font-size: 14px !important;
2251
  }
2252
  }
2253
 
2254
+ /* Loading spinner */
2255
  .spinner {
2256
+ border: 3px solid rgba(99, 102, 241, 0.2);
2257
+ border-top: 3px solid #6366F1;
2258
  border-radius: 50%;
2259
+ animation: spin 1s linear infinite;
2260
  }
2261
 
2262
  @keyframes spin {
 
2268
  .gradio-button.primary,
2269
  button[class*="Primary"],
2270
  [type="button"].primary {
2271
+ background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%) !important;
2272
+ border: 1px solid rgba(255, 255, 255, 0.2) !important;
2273
+ color: white !important;
2274
+ font-weight: 600 !important;
2275
+ border-radius: 16px !important;
2276
+ box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25) !important;
2277
  }
2278
 
2279
  /* Block containers */
2280
  .block {
2281
+ background: rgba(255, 255, 255, 0.25) !important;
2282
+ border-radius: 16px !important;
2283
+ padding: 12px !important;
2284
  }
2285
 
2286
  /* Form elements */
 
2292
 
2293
  with gr.Blocks(
2294
  title="StyleForge: Neural Style Transfer",
2295
+ theme=gr.themes.Glass(
2296
+ primary_hue="indigo",
2297
+ secondary_hue="purple",
2298
  font=gr.themes.GoogleFont("Inter"),
2299
+ radius_size="lg",
2300
  ),
2301
  css=custom_css,
2302
  ) as demo:
2303
 
2304
+ # Header with Portal-style hero section
2305
  cuda_badge = f"<span class='backend-badge'>CUDA Accelerated</span>" if CUDA_KERNELS_AVAILABLE else ""
2306
  gr.Markdown(f"""
2307
+ <div style="text-align: center; padding: 3rem 0 2rem 0;">
2308
+ <h1 style="font-size: 3rem; margin-bottom: 0.5rem; background: linear-gradient(135deg, #6366F1, #8B5CF6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700;">
2309
  StyleForge
2310
  </h1>
2311
+ <p style="color: #6B7280; font-size: 1.1rem; margin-bottom: 1rem;">
2312
  Neural Style Transfer with Custom CUDA Kernels
2313
  </p>
2314
  {cuda_badge}
2315
+ <p style="color: #9CA3AF; margin-top: 1rem; font-size: 0.9rem;">
2316
+ Custom Styles • Region Transfer • Style Blending • Real-time Processing
2317
+ </p>
2318
  </div>
2319
  """)
2320