Spaces:
Sleeping
Sleeping
github-actions[bot]
commited on
Commit
·
0598f44
1
Parent(s):
1c5289d
Deploy from GitHub - 2026-01-19 19:23:20
Browse files
app.py
CHANGED
|
@@ -1733,418 +1733,406 @@ def create_style_blend_output(
|
|
| 1733 |
|
| 1734 |
custom_css = """
|
| 1735 |
/* ============================================
|
| 1736 |
-
|
| 1737 |
============================================ */
|
| 1738 |
|
| 1739 |
-
/* Root variables for
|
| 1740 |
:root {
|
| 1741 |
-
--
|
| 1742 |
-
--
|
| 1743 |
-
--
|
| 1744 |
-
--
|
| 1745 |
-
--
|
| 1746 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1747 |
}
|
| 1748 |
|
| 1749 |
-
/*
|
| 1750 |
body {
|
| 1751 |
-
background:
|
| 1752 |
-
background-size: 400% 400%;
|
| 1753 |
-
animation: gradientShift 15s ease infinite;
|
| 1754 |
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
| 1755 |
min-height: 100vh;
|
|
|
|
| 1756 |
}
|
| 1757 |
|
| 1758 |
-
|
| 1759 |
-
0% { background-position: 0% 50%; }
|
| 1760 |
-
50% { background-position: 100% 50%; }
|
| 1761 |
-
100% { background-position: 0% 50%; }
|
| 1762 |
-
}
|
| 1763 |
-
|
| 1764 |
-
/* Main container with glass effect */
|
| 1765 |
.gradio-container {
|
| 1766 |
-
max-width:
|
| 1767 |
-
margin: auto;
|
| 1768 |
-
background:
|
| 1769 |
-
|
| 1770 |
-
-
|
| 1771 |
-
|
| 1772 |
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 1773 |
-
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
|
| 1774 |
-
overflow: hidden;
|
| 1775 |
}
|
| 1776 |
|
| 1777 |
-
/*
|
| 1778 |
.gr-box {
|
| 1779 |
-
background: var(--
|
| 1780 |
-
|
| 1781 |
-
-
|
| 1782 |
-
|
| 1783 |
-
border-radius: 16px !important;
|
| 1784 |
-
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
|
| 1785 |
}
|
| 1786 |
|
| 1787 |
.gr-image-container {
|
| 1788 |
-
border-radius:
|
| 1789 |
overflow: hidden;
|
| 1790 |
-
border: 1px solid
|
|
|
|
| 1791 |
}
|
| 1792 |
|
| 1793 |
-
/* Primary button -
|
| 1794 |
.gr-button-primary {
|
| 1795 |
-
background:
|
| 1796 |
-
|
| 1797 |
-
-webkit-backdrop-filter: blur(10px);
|
| 1798 |
-
border: 1px solid rgba(255, 255, 255, 0.3) !important;
|
| 1799 |
color: white !important;
|
| 1800 |
font-weight: 600 !important;
|
| 1801 |
-
|
|
|
|
| 1802 |
padding: 12px 24px !important;
|
| 1803 |
-
transition: all 0.
|
| 1804 |
-
box-shadow:
|
| 1805 |
-
position: relative;
|
| 1806 |
-
overflow: hidden;
|
| 1807 |
-
}
|
| 1808 |
-
|
| 1809 |
-
.gr-button-primary::before {
|
| 1810 |
-
content: '';
|
| 1811 |
-
position: absolute;
|
| 1812 |
-
top: 0;
|
| 1813 |
-
left: -100%;
|
| 1814 |
-
width: 100%;
|
| 1815 |
-
height: 100%;
|
| 1816 |
-
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
|
| 1817 |
-
transition: left 0.5s;
|
| 1818 |
-
}
|
| 1819 |
-
|
| 1820 |
-
.gr-button-primary:hover::before {
|
| 1821 |
-
left: 100%;
|
| 1822 |
}
|
| 1823 |
|
| 1824 |
.gr-button-primary:hover {
|
| 1825 |
-
transform: translateY(-
|
| 1826 |
-
box-shadow:
|
|
|
|
| 1827 |
}
|
| 1828 |
|
| 1829 |
.gr-button-primary:active {
|
| 1830 |
-
transform: translateY(
|
| 1831 |
}
|
| 1832 |
|
| 1833 |
-
/* Secondary button */
|
| 1834 |
.gr-button-secondary {
|
| 1835 |
-
background:
|
| 1836 |
-
|
| 1837 |
-
|
| 1838 |
-
|
| 1839 |
-
|
| 1840 |
-
|
| 1841 |
-
|
| 1842 |
-
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
|
| 1843 |
}
|
| 1844 |
|
| 1845 |
.gr-button-secondary:hover {
|
| 1846 |
-
background:
|
| 1847 |
-
|
| 1848 |
-
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
|
| 1849 |
}
|
| 1850 |
|
| 1851 |
-
/* Dropdown styling */
|
| 1852 |
.gr-dropdown {
|
| 1853 |
-
background:
|
| 1854 |
-
|
| 1855 |
-
border:
|
| 1856 |
-
|
| 1857 |
}
|
| 1858 |
|
| 1859 |
.gr-dropdown-options {
|
| 1860 |
-
background:
|
| 1861 |
-
|
| 1862 |
-
border:
|
| 1863 |
-
|
| 1864 |
}
|
| 1865 |
|
| 1866 |
-
/* Slider styling */
|
| 1867 |
input[type="range"] {
|
| 1868 |
-webkit-appearance: none;
|
| 1869 |
-
background:
|
| 1870 |
-
border-radius:
|
| 1871 |
-
height:
|
| 1872 |
}
|
| 1873 |
|
| 1874 |
input[type="range"]::-webkit-slider-thumb {
|
| 1875 |
-webkit-appearance: none;
|
| 1876 |
-
width:
|
| 1877 |
-
height:
|
| 1878 |
-
background:
|
|
|
|
| 1879 |
border-radius: 50%;
|
| 1880 |
cursor: pointer;
|
| 1881 |
-
box-shadow:
|
| 1882 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1883 |
}
|
| 1884 |
|
| 1885 |
-
/* Radio buttons */
|
| 1886 |
.gr-radio {
|
| 1887 |
-
background:
|
| 1888 |
-
border: 1px solid
|
| 1889 |
-
border-radius:
|
| 1890 |
padding: 12px !important;
|
| 1891 |
}
|
| 1892 |
|
| 1893 |
.gr-radio:hover {
|
| 1894 |
-
background:
|
| 1895 |
}
|
| 1896 |
|
| 1897 |
-
/* Tab styling */
|
| 1898 |
.tabs {
|
| 1899 |
-
background:
|
| 1900 |
-
|
| 1901 |
-
border
|
| 1902 |
-
|
| 1903 |
-
|
| 1904 |
}
|
| 1905 |
|
| 1906 |
.tab-item {
|
| 1907 |
background: transparent !important;
|
| 1908 |
-
border-radius:
|
| 1909 |
-
transition: all 0.
|
|
|
|
|
|
|
|
|
|
| 1910 |
}
|
| 1911 |
|
| 1912 |
.tab-item:hover {
|
| 1913 |
-
background:
|
|
|
|
| 1914 |
}
|
| 1915 |
|
| 1916 |
.tab-item.selected {
|
| 1917 |
-
background:
|
| 1918 |
-
|
|
|
|
|
|
|
| 1919 |
}
|
| 1920 |
|
| 1921 |
-
/* Accordion styling */
|
| 1922 |
details {
|
| 1923 |
-
background:
|
| 1924 |
-
|
| 1925 |
-
border:
|
| 1926 |
-
border-radius: 16px !important;
|
| 1927 |
overflow: hidden;
|
| 1928 |
}
|
| 1929 |
|
| 1930 |
summary {
|
| 1931 |
-
background:
|
| 1932 |
-
border-radius:
|
| 1933 |
padding: 16px !important;
|
| 1934 |
cursor: pointer;
|
| 1935 |
-
transition: all 0.
|
|
|
|
|
|
|
| 1936 |
}
|
| 1937 |
|
| 1938 |
summary:hover {
|
| 1939 |
-
background:
|
| 1940 |
}
|
| 1941 |
|
| 1942 |
-
/* Headings
|
| 1943 |
h1 {
|
| 1944 |
text-align: center;
|
| 1945 |
-
|
|
|
|
| 1946 |
-webkit-background-clip: text;
|
| 1947 |
-webkit-text-fill-color: transparent;
|
| 1948 |
background-clip: text;
|
| 1949 |
-
font-weight:
|
| 1950 |
font-size: 2.5rem;
|
| 1951 |
-
letter-spacing: -0.
|
| 1952 |
-
|
| 1953 |
}
|
| 1954 |
|
| 1955 |
h2, h3 {
|
| 1956 |
-
color:
|
|
|
|
|
|
|
| 1957 |
}
|
| 1958 |
|
| 1959 |
/* Markdown text color */
|
| 1960 |
.markdown {
|
| 1961 |
-
color:
|
| 1962 |
}
|
| 1963 |
|
| 1964 |
.markdown strong {
|
| 1965 |
-
color:
|
|
|
|
| 1966 |
}
|
| 1967 |
|
| 1968 |
-
/*
|
| 1969 |
.live-badge {
|
| 1970 |
display: inline-block;
|
| 1971 |
-
padding:
|
| 1972 |
-
background:
|
| 1973 |
-
|
| 1974 |
-
color: white;
|
| 1975 |
border-radius: 20px;
|
| 1976 |
font-size: 12px;
|
| 1977 |
font-weight: 600;
|
| 1978 |
-
border: 1px solid
|
| 1979 |
-
animation: pulse-glow 2s infinite;
|
| 1980 |
-
box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
|
| 1981 |
-
}
|
| 1982 |
-
|
| 1983 |
-
@keyframes pulse-glow {
|
| 1984 |
-
0%, 100% {
|
| 1985 |
-
opacity: 1;
|
| 1986 |
-
box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
|
| 1987 |
-
}
|
| 1988 |
-
50% {
|
| 1989 |
-
opacity: 0.85;
|
| 1990 |
-
box-shadow: 0 4px 30px rgba(239, 68, 68, 0.6);
|
| 1991 |
-
}
|
| 1992 |
}
|
| 1993 |
|
| 1994 |
-
/* Backend badge with glass effect */
|
| 1995 |
.backend-badge {
|
| 1996 |
display: inline-block;
|
| 1997 |
-
padding:
|
| 1998 |
-
background:
|
| 1999 |
-
|
| 2000 |
-
color: white;
|
| 2001 |
border-radius: 20px;
|
| 2002 |
font-size: 12px;
|
| 2003 |
font-weight: 600;
|
| 2004 |
-
border: 1px solid
|
| 2005 |
-
box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
|
| 2006 |
}
|
| 2007 |
|
| 2008 |
/* Checkbox styling */
|
| 2009 |
.gr-checkbox {
|
| 2010 |
-
background:
|
| 2011 |
-
border: 1px solid
|
| 2012 |
-
border-radius:
|
| 2013 |
}
|
| 2014 |
|
| 2015 |
/* Text input / Textbox */
|
| 2016 |
.gr-textbox, .gr-text-input {
|
| 2017 |
-
background:
|
| 2018 |
-
|
| 2019 |
-
border:
|
| 2020 |
-
|
| 2021 |
-
color: rgba(255, 255, 255, 0.9) !important;
|
| 2022 |
}
|
| 2023 |
|
| 2024 |
.gr-textbox:focus, .gr-text-input:focus {
|
| 2025 |
-
border-color:
|
| 2026 |
-
box-shadow: 0 0
|
|
|
|
| 2027 |
}
|
| 2028 |
|
| 2029 |
-
/* Footer */
|
| 2030 |
.footer {
|
| 2031 |
text-align: center;
|
| 2032 |
-
margin-top:
|
| 2033 |
-
padding:
|
| 2034 |
-
background:
|
| 2035 |
-
|
| 2036 |
-
|
| 2037 |
-
border-radius: 16px;
|
| 2038 |
-
color: rgba(255, 255, 255, 0.6);
|
| 2039 |
}
|
| 2040 |
|
| 2041 |
.footer a {
|
| 2042 |
-
color:
|
| 2043 |
text-decoration: none;
|
| 2044 |
-
|
|
|
|
| 2045 |
}
|
| 2046 |
|
| 2047 |
.footer a:hover {
|
| 2048 |
-
color:
|
| 2049 |
}
|
| 2050 |
|
| 2051 |
/* Info/Stats boxes */
|
| 2052 |
.gr-markdown {
|
| 2053 |
-
background:
|
| 2054 |
-
|
| 2055 |
-
border:
|
| 2056 |
-
|
| 2057 |
-
padding: 20px !important;
|
| 2058 |
}
|
| 2059 |
|
| 2060 |
.gr-markdown blockquote {
|
| 2061 |
-
border-left: 3px solid
|
| 2062 |
-
background:
|
| 2063 |
padding: 12px 16px !important;
|
| 2064 |
-
border-radius:
|
|
|
|
| 2065 |
}
|
| 2066 |
|
| 2067 |
-
/* Scrollbar styling */
|
| 2068 |
::-webkit-scrollbar {
|
| 2069 |
-
width:
|
|
|
|
| 2070 |
}
|
| 2071 |
|
| 2072 |
::-webkit-scrollbar-track {
|
| 2073 |
-
background:
|
| 2074 |
-
border-radius: 10px;
|
| 2075 |
}
|
| 2076 |
|
| 2077 |
::-webkit-scrollbar-thumb {
|
| 2078 |
-
background:
|
| 2079 |
-
border-radius:
|
| 2080 |
-
border: 2px solid rgba(255, 255, 255, 0.1);
|
| 2081 |
}
|
| 2082 |
|
| 2083 |
::-webkit-scrollbar-thumb:hover {
|
| 2084 |
-
background:
|
| 2085 |
}
|
| 2086 |
|
| 2087 |
-
/* Example cards */
|
| 2088 |
.gr-example {
|
| 2089 |
-
background:
|
| 2090 |
-
border: 1px solid
|
| 2091 |
-
border-radius:
|
| 2092 |
-
transition: all 0.
|
| 2093 |
}
|
| 2094 |
|
| 2095 |
.gr-example:hover {
|
| 2096 |
-
|
| 2097 |
-
|
| 2098 |
-
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2) !important;
|
| 2099 |
}
|
| 2100 |
|
| 2101 |
-
/*
|
| 2102 |
.gradio-container::before,
|
| 2103 |
.gradio-container::after {
|
| 2104 |
-
|
| 2105 |
-
position: absolute;
|
| 2106 |
-
width: 300px;
|
| 2107 |
-
height: 300px;
|
| 2108 |
-
border-radius: 50%;
|
| 2109 |
-
filter: blur(80px);
|
| 2110 |
-
opacity: 0.3;
|
| 2111 |
-
pointer-events: none;
|
| 2112 |
-
z-index: -1;
|
| 2113 |
}
|
| 2114 |
|
| 2115 |
-
|
| 2116 |
-
|
| 2117 |
-
|
| 2118 |
-
|
| 2119 |
-
|
| 2120 |
}
|
| 2121 |
|
| 2122 |
-
|
| 2123 |
-
|
| 2124 |
-
|
| 2125 |
-
|
| 2126 |
-
animation: float2 10s ease-in-out infinite;
|
| 2127 |
}
|
| 2128 |
|
| 2129 |
-
|
| 2130 |
-
|
| 2131 |
-
|
| 2132 |
}
|
| 2133 |
|
| 2134 |
-
|
| 2135 |
-
|
| 2136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2137 |
}
|
| 2138 |
|
| 2139 |
/* Mobile optimization */
|
| 2140 |
@media (max-width: 768px) {
|
| 2141 |
.gradio-container {
|
| 2142 |
-
padding: 1rem
|
| 2143 |
-
border-radius: 16px !important;
|
| 2144 |
}
|
| 2145 |
|
| 2146 |
.gr-row {
|
| 2147 |
flex-direction: column !important;
|
|
|
|
| 2148 |
}
|
| 2149 |
|
| 2150 |
.gr-column {
|
|
@@ -2152,12 +2140,16 @@ h2, h3 {
|
|
| 2152 |
}
|
| 2153 |
|
| 2154 |
h1 {
|
| 2155 |
-
font-size:
|
| 2156 |
}
|
| 2157 |
|
| 2158 |
.gr-button-primary {
|
| 2159 |
padding: 10px 20px !important;
|
| 2160 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2161 |
}
|
| 2162 |
"""
|
| 2163 |
|
|
@@ -2172,15 +2164,19 @@ with gr.Blocks(
|
|
| 2172 |
css=custom_css
|
| 2173 |
) as demo:
|
| 2174 |
|
| 2175 |
-
# Header with
|
| 2176 |
-
cuda_badge = f"<span class='backend-badge'>CUDA
|
| 2177 |
gr.Markdown(f"""
|
| 2178 |
-
<div style="text-align: center; padding:
|
| 2179 |
-
<h1 style="font-size:
|
| 2180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2181 |
{cuda_badge}
|
| 2182 |
-
<p style="color:
|
| 2183 |
-
|
| 2184 |
</p>
|
| 2185 |
</div>
|
| 2186 |
""")
|
|
|
|
| 1733 |
|
| 1734 |
custom_css = """
|
| 1735 |
/* ============================================
|
| 1736 |
+
PORTAL-INSPIRED CLEAN LIGHT THEME
|
| 1737 |
============================================ */
|
| 1738 |
|
| 1739 |
+
/* Root variables for clean light theme */
|
| 1740 |
:root {
|
| 1741 |
+
--bg-primary: #FAFAFA;
|
| 1742 |
+
--bg-secondary: #FFFFFF;
|
| 1743 |
+
--bg-tertiary: #F5F5F5;
|
| 1744 |
+
--text-primary: #1A1A1A;
|
| 1745 |
+
--text-secondary: #6B7280;
|
| 1746 |
+
--text-tertiary: #9CA3AF;
|
| 1747 |
+
--border-color: #E5E7EB;
|
| 1748 |
+
--border-light: #F3F4F6;
|
| 1749 |
+
--accent-primary: #6366F1;
|
| 1750 |
+
--accent-secondary: #8B5CF6;
|
| 1751 |
+
--accent-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
|
| 1752 |
+
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
| 1753 |
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
| 1754 |
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 1755 |
+
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
| 1756 |
+
--radius-sm: 8px;
|
| 1757 |
+
--radius-md: 12px;
|
| 1758 |
+
--radius-lg: 16px;
|
| 1759 |
+
--radius-xl: 24px;
|
| 1760 |
}
|
| 1761 |
|
| 1762 |
+
/* Clean light background */
|
| 1763 |
body {
|
| 1764 |
+
background: var(--bg-primary);
|
|
|
|
|
|
|
| 1765 |
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
| 1766 |
min-height: 100vh;
|
| 1767 |
+
color: var(--text-primary);
|
| 1768 |
}
|
| 1769 |
|
| 1770 |
+
/* Main container - clean and minimal */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1771 |
.gradio-container {
|
| 1772 |
+
max-width: 1200px;
|
| 1773 |
+
margin: 0 auto;
|
| 1774 |
+
background: transparent !important;
|
| 1775 |
+
border: none !important;
|
| 1776 |
+
box-shadow: none !important;
|
| 1777 |
+
padding: 2rem 1.5rem !important;
|
|
|
|
|
|
|
|
|
|
| 1778 |
}
|
| 1779 |
|
| 1780 |
+
/* Clean card style for components */
|
| 1781 |
.gr-box {
|
| 1782 |
+
background: var(--bg-secondary) !important;
|
| 1783 |
+
border: 1px solid var(--border-color) !important;
|
| 1784 |
+
border-radius: var(--radius-lg) !important;
|
| 1785 |
+
box-shadow: var(--shadow-sm) !important;
|
|
|
|
|
|
|
| 1786 |
}
|
| 1787 |
|
| 1788 |
.gr-image-container {
|
| 1789 |
+
border-radius: var(--radius-md) !important;
|
| 1790 |
overflow: hidden;
|
| 1791 |
+
border: 1px solid var(--border-color) !important;
|
| 1792 |
+
background: var(--bg-secondary) !important;
|
| 1793 |
}
|
| 1794 |
|
| 1795 |
+
/* Primary button - clean, modern style */
|
| 1796 |
.gr-button-primary {
|
| 1797 |
+
background: var(--accent-gradient) !important;
|
| 1798 |
+
border: none !important;
|
|
|
|
|
|
|
| 1799 |
color: white !important;
|
| 1800 |
font-weight: 600 !important;
|
| 1801 |
+
font-size: 14px !important;
|
| 1802 |
+
border-radius: var(--radius-md) !important;
|
| 1803 |
padding: 12px 24px !important;
|
| 1804 |
+
transition: all 0.2s ease !important;
|
| 1805 |
+
box-shadow: var(--shadow-md) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1806 |
}
|
| 1807 |
|
| 1808 |
.gr-button-primary:hover {
|
| 1809 |
+
transform: translateY(-1px);
|
| 1810 |
+
box-shadow: var(--shadow-lg) !important;
|
| 1811 |
+
filter: brightness(1.05);
|
| 1812 |
}
|
| 1813 |
|
| 1814 |
.gr-button-primary:active {
|
| 1815 |
+
transform: translateY(0);
|
| 1816 |
}
|
| 1817 |
|
| 1818 |
+
/* Secondary button - clean outline style */
|
| 1819 |
.gr-button-secondary {
|
| 1820 |
+
background: var(--bg-secondary) !important;
|
| 1821 |
+
border: 1px solid var(--border-color) !important;
|
| 1822 |
+
color: var(--text-primary) !important;
|
| 1823 |
+
font-weight: 500 !important;
|
| 1824 |
+
border-radius: var(--radius-md) !important;
|
| 1825 |
+
transition: all 0.2s ease !important;
|
| 1826 |
+
box-shadow: var(--shadow-sm) !important;
|
|
|
|
| 1827 |
}
|
| 1828 |
|
| 1829 |
.gr-button-secondary:hover {
|
| 1830 |
+
background: var(--bg-tertiary) !important;
|
| 1831 |
+
border-color: var(--border-color) !important;
|
|
|
|
| 1832 |
}
|
| 1833 |
|
| 1834 |
+
/* Dropdown styling - clean and minimal */
|
| 1835 |
.gr-dropdown {
|
| 1836 |
+
background: var(--bg-secondary) !important;
|
| 1837 |
+
border: 1px solid var(--border-color) !important;
|
| 1838 |
+
border-radius: var(--radius-md) !important;
|
| 1839 |
+
color: var(--text-primary) !important;
|
| 1840 |
}
|
| 1841 |
|
| 1842 |
.gr-dropdown-options {
|
| 1843 |
+
background: var(--bg-secondary) !important;
|
| 1844 |
+
border: 1px solid var(--border-color) !important;
|
| 1845 |
+
border-radius: var(--radius-md) !important;
|
| 1846 |
+
box-shadow: var(--shadow-lg) !important;
|
| 1847 |
}
|
| 1848 |
|
| 1849 |
+
/* Slider styling - clean modern look */
|
| 1850 |
input[type="range"] {
|
| 1851 |
-webkit-appearance: none;
|
| 1852 |
+
background: var(--bg-tertiary);
|
| 1853 |
+
border-radius: 4px;
|
| 1854 |
+
height: 6px;
|
| 1855 |
}
|
| 1856 |
|
| 1857 |
input[type="range"]::-webkit-slider-thumb {
|
| 1858 |
-webkit-appearance: none;
|
| 1859 |
+
width: 18px;
|
| 1860 |
+
height: 18px;
|
| 1861 |
+
background: var(--bg-secondary);
|
| 1862 |
+
border: 3px solid var(--accent-primary);
|
| 1863 |
border-radius: 50%;
|
| 1864 |
cursor: pointer;
|
| 1865 |
+
box-shadow: var(--shadow-md);
|
| 1866 |
+
transition: all 0.2s ease;
|
| 1867 |
+
}
|
| 1868 |
+
|
| 1869 |
+
input[type="range"]::-webkit-slider-thumb:hover {
|
| 1870 |
+
transform: scale(1.1);
|
| 1871 |
+
box-shadow: var(--shadow-lg);
|
| 1872 |
}
|
| 1873 |
|
| 1874 |
+
/* Radio buttons - clean style */
|
| 1875 |
.gr-radio {
|
| 1876 |
+
background: var(--bg-secondary) !important;
|
| 1877 |
+
border: 1px solid var(--border-color) !important;
|
| 1878 |
+
border-radius: var(--radius-md) !important;
|
| 1879 |
padding: 12px !important;
|
| 1880 |
}
|
| 1881 |
|
| 1882 |
.gr-radio:hover {
|
| 1883 |
+
background: var(--bg-tertiary) !important;
|
| 1884 |
}
|
| 1885 |
|
| 1886 |
+
/* Tab styling - minimal pill style */
|
| 1887 |
.tabs {
|
| 1888 |
+
background: var(--bg-tertiary) !important;
|
| 1889 |
+
border-radius: var(--radius-lg) !important;
|
| 1890 |
+
border: none !important;
|
| 1891 |
+
padding: 6px !important;
|
| 1892 |
+
gap: 4px !important;
|
| 1893 |
}
|
| 1894 |
|
| 1895 |
.tab-item {
|
| 1896 |
background: transparent !important;
|
| 1897 |
+
border-radius: var(--radius-md) !important;
|
| 1898 |
+
transition: all 0.2s ease !important;
|
| 1899 |
+
color: var(--text-secondary) !important;
|
| 1900 |
+
font-weight: 500 !important;
|
| 1901 |
+
padding: 10px 18px !important;
|
| 1902 |
}
|
| 1903 |
|
| 1904 |
.tab-item:hover {
|
| 1905 |
+
background: var(--bg-secondary) !important;
|
| 1906 |
+
color: var(--text-primary) !important;
|
| 1907 |
}
|
| 1908 |
|
| 1909 |
.tab-item.selected {
|
| 1910 |
+
background: var(--bg-secondary) !important;
|
| 1911 |
+
color: var(--text-primary) !important;
|
| 1912 |
+
box-shadow: var(--shadow-sm) !important;
|
| 1913 |
+
font-weight: 600 !important;
|
| 1914 |
}
|
| 1915 |
|
| 1916 |
+
/* Accordion styling - clean */
|
| 1917 |
details {
|
| 1918 |
+
background: var(--bg-secondary) !important;
|
| 1919 |
+
border: 1px solid var(--border-color) !important;
|
| 1920 |
+
border-radius: var(--radius-md) !important;
|
|
|
|
| 1921 |
overflow: hidden;
|
| 1922 |
}
|
| 1923 |
|
| 1924 |
summary {
|
| 1925 |
+
background: transparent !important;
|
| 1926 |
+
border-radius: var(--radius-md) !important;
|
| 1927 |
padding: 16px !important;
|
| 1928 |
cursor: pointer;
|
| 1929 |
+
transition: all 0.2s ease;
|
| 1930 |
+
color: var(--text-primary) !important;
|
| 1931 |
+
font-weight: 500 !important;
|
| 1932 |
}
|
| 1933 |
|
| 1934 |
summary:hover {
|
| 1935 |
+
background: var(--bg-tertiary) !important;
|
| 1936 |
}
|
| 1937 |
|
| 1938 |
+
/* Headings - clean typography */
|
| 1939 |
h1 {
|
| 1940 |
text-align: center;
|
| 1941 |
+
color: var(--text-primary) !important;
|
| 1942 |
+
background: var(--accent-gradient);
|
| 1943 |
-webkit-background-clip: text;
|
| 1944 |
-webkit-text-fill-color: transparent;
|
| 1945 |
background-clip: text;
|
| 1946 |
+
font-weight: 700;
|
| 1947 |
font-size: 2.5rem;
|
| 1948 |
+
letter-spacing: -0.03em;
|
| 1949 |
+
margin-bottom: 0.5rem;
|
| 1950 |
}
|
| 1951 |
|
| 1952 |
h2, h3 {
|
| 1953 |
+
color: var(--text-primary) !important;
|
| 1954 |
+
font-weight: 600 !important;
|
| 1955 |
+
letter-spacing: -0.02em;
|
| 1956 |
}
|
| 1957 |
|
| 1958 |
/* Markdown text color */
|
| 1959 |
.markdown {
|
| 1960 |
+
color: var(--text-secondary) !important;
|
| 1961 |
}
|
| 1962 |
|
| 1963 |
.markdown strong {
|
| 1964 |
+
color: var(--text-primary) !important;
|
| 1965 |
+
font-weight: 600;
|
| 1966 |
}
|
| 1967 |
|
| 1968 |
+
/* Badge styles - clean pill design */
|
| 1969 |
.live-badge {
|
| 1970 |
display: inline-block;
|
| 1971 |
+
padding: 4px 12px;
|
| 1972 |
+
background: #FEF3C7;
|
| 1973 |
+
color: #92400E;
|
|
|
|
| 1974 |
border-radius: 20px;
|
| 1975 |
font-size: 12px;
|
| 1976 |
font-weight: 600;
|
| 1977 |
+
border: 1px solid #FDE68A;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1978 |
}
|
| 1979 |
|
|
|
|
| 1980 |
.backend-badge {
|
| 1981 |
display: inline-block;
|
| 1982 |
+
padding: 4px 12px;
|
| 1983 |
+
background: #D1FAE5;
|
| 1984 |
+
color: #065F46;
|
|
|
|
| 1985 |
border-radius: 20px;
|
| 1986 |
font-size: 12px;
|
| 1987 |
font-weight: 600;
|
| 1988 |
+
border: 1px solid #A7F3D0;
|
|
|
|
| 1989 |
}
|
| 1990 |
|
| 1991 |
/* Checkbox styling */
|
| 1992 |
.gr-checkbox {
|
| 1993 |
+
background: var(--bg-secondary) !important;
|
| 1994 |
+
border: 1px solid var(--border-color) !important;
|
| 1995 |
+
border-radius: 6px !important;
|
| 1996 |
}
|
| 1997 |
|
| 1998 |
/* Text input / Textbox */
|
| 1999 |
.gr-textbox, .gr-text-input {
|
| 2000 |
+
background: var(--bg-secondary) !important;
|
| 2001 |
+
border: 1px solid var(--border-color) !important;
|
| 2002 |
+
border-radius: var(--radius-md) !important;
|
| 2003 |
+
color: var(--text-primary) !important;
|
|
|
|
| 2004 |
}
|
| 2005 |
|
| 2006 |
.gr-textbox:focus, .gr-text-input:focus {
|
| 2007 |
+
border-color: var(--accent-primary) !important;
|
| 2008 |
+
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
|
| 2009 |
+
outline: none;
|
| 2010 |
}
|
| 2011 |
|
| 2012 |
+
/* Footer - clean minimal */
|
| 2013 |
.footer {
|
| 2014 |
text-align: center;
|
| 2015 |
+
margin-top: 3rem;
|
| 2016 |
+
padding: 2rem;
|
| 2017 |
+
background: transparent;
|
| 2018 |
+
border-top: 1px solid var(--border-color);
|
| 2019 |
+
color: var(--text-secondary);
|
|
|
|
|
|
|
| 2020 |
}
|
| 2021 |
|
| 2022 |
.footer a {
|
| 2023 |
+
color: var(--accent-primary) !important;
|
| 2024 |
text-decoration: none;
|
| 2025 |
+
font-weight: 500;
|
| 2026 |
+
transition: color 0.2s ease;
|
| 2027 |
}
|
| 2028 |
|
| 2029 |
.footer a:hover {
|
| 2030 |
+
color: var(--accent-secondary) !important;
|
| 2031 |
}
|
| 2032 |
|
| 2033 |
/* Info/Stats boxes */
|
| 2034 |
.gr-markdown {
|
| 2035 |
+
background: var(--bg-secondary) !important;
|
| 2036 |
+
border: 1px solid var(--border-color) !important;
|
| 2037 |
+
border-radius: var(--radius-md) !important;
|
| 2038 |
+
padding: 16px 20px !important;
|
|
|
|
| 2039 |
}
|
| 2040 |
|
| 2041 |
.gr-markdown blockquote {
|
| 2042 |
+
border-left: 3px solid var(--accent-primary) !important;
|
| 2043 |
+
background: var(--bg-tertiary) !important;
|
| 2044 |
padding: 12px 16px !important;
|
| 2045 |
+
border-radius: var(--radius-sm) !important;
|
| 2046 |
+
color: var(--text-secondary) !important;
|
| 2047 |
}
|
| 2048 |
|
| 2049 |
+
/* Scrollbar styling - subtle */
|
| 2050 |
::-webkit-scrollbar {
|
| 2051 |
+
width: 8px;
|
| 2052 |
+
height: 8px;
|
| 2053 |
}
|
| 2054 |
|
| 2055 |
::-webkit-scrollbar-track {
|
| 2056 |
+
background: transparent;
|
|
|
|
| 2057 |
}
|
| 2058 |
|
| 2059 |
::-webkit-scrollbar-thumb {
|
| 2060 |
+
background: var(--border-color);
|
| 2061 |
+
border-radius: 4px;
|
|
|
|
| 2062 |
}
|
| 2063 |
|
| 2064 |
::-webkit-scrollbar-thumb:hover {
|
| 2065 |
+
background: var(--text-tertiary);
|
| 2066 |
}
|
| 2067 |
|
| 2068 |
+
/* Example cards - clean hover effect */
|
| 2069 |
.gr-example {
|
| 2070 |
+
background: var(--bg-secondary) !important;
|
| 2071 |
+
border: 1px solid var(--border-color) !important;
|
| 2072 |
+
border-radius: var(--radius-md) !important;
|
| 2073 |
+
transition: all 0.2s ease !important;
|
| 2074 |
}
|
| 2075 |
|
| 2076 |
.gr-example:hover {
|
| 2077 |
+
border-color: var(--accent-primary) !important;
|
| 2078 |
+
box-shadow: var(--shadow-md) !important;
|
|
|
|
| 2079 |
}
|
| 2080 |
|
| 2081 |
+
/* Remove floating orbs - cleaner look */
|
| 2082 |
.gradio-container::before,
|
| 2083 |
.gradio-container::after {
|
| 2084 |
+
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2085 |
}
|
| 2086 |
|
| 2087 |
+
/* Label styling */
|
| 2088 |
+
label {
|
| 2089 |
+
color: var(--text-secondary) !important;
|
| 2090 |
+
font-weight: 500 !important;
|
| 2091 |
+
font-size: 14px !important;
|
| 2092 |
}
|
| 2093 |
|
| 2094 |
+
/* Progress bar */
|
| 2095 |
+
.prog {
|
| 2096 |
+
background: var(--bg-tertiary) !important;
|
| 2097 |
+
border-radius: 4px !important;
|
|
|
|
| 2098 |
}
|
| 2099 |
|
| 2100 |
+
.prog .prog-bar {
|
| 2101 |
+
background: var(--accent-gradient) !important;
|
| 2102 |
+
border-radius: 4px !important;
|
| 2103 |
}
|
| 2104 |
|
| 2105 |
+
/* Gallery/output styling */
|
| 2106 |
+
.output {
|
| 2107 |
+
border: 1px solid var(--border-color) !important;
|
| 2108 |
+
border-radius: var(--radius-md) !important;
|
| 2109 |
+
background: var(--bg-secondary) !important;
|
| 2110 |
+
}
|
| 2111 |
+
|
| 2112 |
+
/* Form container styling */
|
| 2113 |
+
.form {
|
| 2114 |
+
background: transparent !important;
|
| 2115 |
+
border: none !important;
|
| 2116 |
+
gap: 1rem !important;
|
| 2117 |
+
}
|
| 2118 |
+
|
| 2119 |
+
/* Group styling */
|
| 2120 |
+
.group {
|
| 2121 |
+
background: var(--bg-secondary) !important;
|
| 2122 |
+
border: 1px solid var(--border-color) !important;
|
| 2123 |
+
border-radius: var(--radius-lg) !important;
|
| 2124 |
+
padding: 1.5rem !important;
|
| 2125 |
}
|
| 2126 |
|
| 2127 |
/* Mobile optimization */
|
| 2128 |
@media (max-width: 768px) {
|
| 2129 |
.gradio-container {
|
| 2130 |
+
padding: 1rem !important;
|
|
|
|
| 2131 |
}
|
| 2132 |
|
| 2133 |
.gr-row {
|
| 2134 |
flex-direction: column !important;
|
| 2135 |
+
gap: 1rem !important;
|
| 2136 |
}
|
| 2137 |
|
| 2138 |
.gr-column {
|
|
|
|
| 2140 |
}
|
| 2141 |
|
| 2142 |
h1 {
|
| 2143 |
+
font-size: 2rem;
|
| 2144 |
}
|
| 2145 |
|
| 2146 |
.gr-button-primary {
|
| 2147 |
padding: 10px 20px !important;
|
| 2148 |
}
|
| 2149 |
+
|
| 2150 |
+
.tabs {
|
| 2151 |
+
flex-wrap: wrap !important;
|
| 2152 |
+
}
|
| 2153 |
}
|
| 2154 |
"""
|
| 2155 |
|
|
|
|
| 2164 |
css=custom_css
|
| 2165 |
) as demo:
|
| 2166 |
|
| 2167 |
+
# Header with Portal-style hero section
|
| 2168 |
+
cuda_badge = f"<span class='backend-badge'>CUDA Accelerated</span>" if CUDA_KERNELS_AVAILABLE else ""
|
| 2169 |
gr.Markdown(f"""
|
| 2170 |
+
<div style="text-align: center; padding: 3rem 0 2rem 0;">
|
| 2171 |
+
<h1 style="font-size: 3.5rem; margin-bottom: 0.75rem; letter-spacing: -0.04em; line-height: 1.1;">
|
| 2172 |
+
Your beautiful neural style transfer toolkit
|
| 2173 |
+
</h1>
|
| 2174 |
+
<p style="color: var(--text-secondary); font-size: 1.25rem; margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.6;">
|
| 2175 |
+
Transform images with stunning artistic styles. From classic masterpieces to modern abstract art.
|
| 2176 |
+
</p>
|
| 2177 |
{cuda_badge}
|
| 2178 |
+
<p style="color: var(--text-tertiary); margin-top: 1.5rem; font-size: 0.9rem;">
|
| 2179 |
+
Custom Styles • Region Transfer • Style Blending • Real-time Processing
|
| 2180 |
</p>
|
| 2181 |
</div>
|
| 2182 |
""")
|