Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -46,34 +46,62 @@ else: IMAGE_PROVIDERS["No Image Providers Configured"] = "none"; UI_DEFAULT_IMAG
|
|
46 |
|
47 |
# --- Enhanced UI Theme and CSS ---
|
48 |
# Using a more bespoke dark theme and extensive CSS for "WOW"
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
font=[gr.themes.GoogleFont("Lexend Deca"), "ui-sans-serif", "system-ui", "sans-serif"],
|
51 |
-
primary_hue=gr.themes.colors.
|
52 |
-
secondary_hue=gr.themes.colors.
|
53 |
-
neutral_hue=gr.themes.colors.
|
54 |
).set(
|
55 |
-
|
56 |
-
|
|
|
57 |
block_border_width="1px",
|
58 |
-
block_border_color="#2A2A4A",
|
59 |
-
block_label_background_fill="#2A2A4A",
|
60 |
-
block_label_text_color
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
66 |
button_secondary_background_fill="#4A4A6A",
|
67 |
-
button_secondary_text_color="#E0E0FF",
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
)
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
omega_css = """
|
78 |
body, .gradio-container { background-color: #0F0F1A !important; color: #D0D0E0 !important; }
|
79 |
.gradio-container { max-width: 1400px !important; margin: auto !important; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); padding: 25px !important; border: 1px solid #2A2A4A;}
|
|
|
46 |
|
47 |
# --- Enhanced UI Theme and CSS ---
|
48 |
# Using a more bespoke dark theme and extensive CSS for "WOW"
|
49 |
+
# algoforge_prime/app.py
|
50 |
+
|
51 |
+
# ... (other imports and initializations) ...
|
52 |
+
|
53 |
+
# --- Gradio UI Theme and CSS for DARK MODE ---
|
54 |
+
# Using a built-in dark theme and then overriding specifics
|
55 |
+
omega_theme = gr.themes.Base( # You can also try gr.themes.Default(dark=True) or another dark base
|
56 |
font=[gr.themes.GoogleFont("Lexend Deca"), "ui-sans-serif", "system-ui", "sans-serif"],
|
57 |
+
primary_hue=gr.themes.colors.purple,
|
58 |
+
secondary_hue=gr.themes.colors.pink,
|
59 |
+
neutral_hue=gr.themes.colors.slate # Changed to slate for better dark mode neutrals
|
60 |
).set(
|
61 |
+
# Valid theme variables that control overall darkness
|
62 |
+
body_background_fill="#0F0F1A", # Dark page background
|
63 |
+
block_background_fill="#1A1A2E", # Darker panel background
|
64 |
block_border_width="1px",
|
65 |
+
block_border_color="#2A2A4A", # Border for blocks
|
66 |
+
block_label_background_fill="#2A2A4A", # Background for block labels
|
67 |
+
# block_label_text_color is usually inherited or set by primary/secondary text colors of the theme
|
68 |
+
|
69 |
+
input_background_fill="#2A2A4A", # Background for input fields
|
70 |
+
input_border_color="#4A4A6A", # Border for input fields
|
71 |
+
# input_text_color is often controlled by text_color_primary or inherited.
|
72 |
+
# We will control text colors more with CSS if needed.
|
73 |
+
|
74 |
+
button_primary_background_fill="linear-gradient(135deg, #7F00FF 0%, #E100FF 100%)",
|
75 |
+
button_primary_text_color="white", # This is usually valid
|
76 |
button_secondary_background_fill="#4A4A6A",
|
77 |
+
button_secondary_text_color="#E0E0FF", # This is usually valid
|
78 |
+
|
79 |
+
slider_color="#A020F0", # Color for the slider itself (track/thumb)
|
80 |
+
# slider_color_accent was likely an old or incorrect name. `slider_color` is more common.
|
81 |
+
|
82 |
+
# For table text color, it's often inherited from body text color or specific component styling in CSS
|
83 |
+
# table_even_background_fill="#1A1A2E", # If these are valid, keep them
|
84 |
+
# table_odd_background_fill="#23233A",
|
85 |
+
# table_border_color="#2A2A4A",
|
86 |
+
|
87 |
+
# These are more likely to be valid:
|
88 |
+
text_color_primary="#E0E0FF", # Primary text color (light for dark theme)
|
89 |
+
text_color_secondary="#B0B0D0", # Secondary text color
|
90 |
+
text_color_accent="#A020F0", # Accent text color
|
91 |
+
text_color_ ሴትምስs="#A020F0", # For links or specific highlights
|
92 |
+
# panel_background_fill is often the same as block_background_fill
|
93 |
)
|
94 |
|
95 |
+
# The CSS (`omega_css`) will be very important for ensuring text colors are correct
|
96 |
+
# on various components if the theme variables don't cover everything.
|
97 |
+
# Your existing omega_css already sets:
|
98 |
+
# body, .gradio-container { color: #D0D0E0 !important; }
|
99 |
+
# .gr-input input, .gr-input textarea, .gr-dropdown select { color: white !important; }
|
100 |
+
# This CSS will likely handle the text colors correctly.
|
101 |
+
|
102 |
+
# ... (rest of your omega_css definition) ...
|
103 |
+
# ... (rest of your app.py) ...
|
104 |
+
|
105 |
omega_css = """
|
106 |
body, .gradio-container { background-color: #0F0F1A !important; color: #D0D0E0 !important; }
|
107 |
.gradio-container { max-width: 1400px !important; margin: auto !important; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); padding: 25px !important; border: 1px solid #2A2A4A;}
|