Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,13 +49,14 @@ class AppleStyleTheme(gr.themes.Base):
|
|
| 49 |
self.set(
|
| 50 |
# Backgrounds: Very light gray background, pure white cards
|
| 51 |
body_background_fill="#F5F5F7", # Apple's signature light gray
|
|
|
|
| 52 |
block_background_fill="#FFFFFF",
|
| 53 |
block_label_background_fill="#FFFFFF",
|
| 54 |
|
| 55 |
# Borders: Very subtle, thin borders
|
| 56 |
block_border_color="#E5E5EA",
|
| 57 |
block_border_width="1px",
|
| 58 |
-
block_shadow="0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03)",
|
| 59 |
block_padding="*spacing_lg",
|
| 60 |
|
| 61 |
# Inputs: Light gray background for inputs (like iOS grouped tables)
|
|
@@ -74,10 +75,6 @@ class AppleStyleTheme(gr.themes.Base):
|
|
| 74 |
# Text
|
| 75 |
block_label_text_color="*neutral_500",
|
| 76 |
block_title_text_color="*neutral_900",
|
| 77 |
-
|
| 78 |
-
# Tabs
|
| 79 |
-
tabs_border_color="#E5E5EA",
|
| 80 |
-
text_color="#1d1d1f",
|
| 81 |
)
|
| 82 |
|
| 83 |
# Instantiate the theme
|
|
@@ -238,7 +235,7 @@ t2i_example_prompts = [
|
|
| 238 |
]
|
| 239 |
|
| 240 |
# Build Gradio interface
|
| 241 |
-
# Theme and CSS are
|
| 242 |
with gr.Blocks(fill_width=True) as demo:
|
| 243 |
|
| 244 |
# Header with IDs for CSS targeting
|
|
@@ -258,7 +255,6 @@ with gr.Blocks(fill_width=True) as demo:
|
|
| 258 |
with gr.TabItem("Edit Image", id=0):
|
| 259 |
with gr.Row():
|
| 260 |
# Left Column: Inputs
|
| 261 |
-
# scale=1 without min_width allows stacking on mobile
|
| 262 |
with gr.Column(scale=1, variant="panel"):
|
| 263 |
gr.Markdown("### 🖼️ Input Image & Controls")
|
| 264 |
input_image = gr.Image(
|
|
@@ -320,7 +316,7 @@ with gr.Blocks(fill_width=True) as demo:
|
|
| 320 |
max_lines=6
|
| 321 |
)
|
| 322 |
|
| 323 |
-
#
|
| 324 |
t2i_width = gr.Slider(
|
| 325 |
minimum=512,
|
| 326 |
maximum=2048,
|
|
@@ -395,7 +391,7 @@ with gr.Blocks(fill_width=True) as demo:
|
|
| 395 |
""")
|
| 396 |
|
| 397 |
# Launch the app
|
| 398 |
-
#
|
| 399 |
if __name__ == "__main__":
|
| 400 |
demo.launch(
|
| 401 |
mcp_server=True,
|
|
|
|
| 49 |
self.set(
|
| 50 |
# Backgrounds: Very light gray background, pure white cards
|
| 51 |
body_background_fill="#F5F5F7", # Apple's signature light gray
|
| 52 |
+
body_text_color="#1d1d1f", # Corrected from 'text_color'
|
| 53 |
block_background_fill="#FFFFFF",
|
| 54 |
block_label_background_fill="#FFFFFF",
|
| 55 |
|
| 56 |
# Borders: Very subtle, thin borders
|
| 57 |
block_border_color="#E5E5EA",
|
| 58 |
block_border_width="1px",
|
| 59 |
+
block_shadow="0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03)",
|
| 60 |
block_padding="*spacing_lg",
|
| 61 |
|
| 62 |
# Inputs: Light gray background for inputs (like iOS grouped tables)
|
|
|
|
| 75 |
# Text
|
| 76 |
block_label_text_color="*neutral_500",
|
| 77 |
block_title_text_color="*neutral_900",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
)
|
| 79 |
|
| 80 |
# Instantiate the theme
|
|
|
|
| 235 |
]
|
| 236 |
|
| 237 |
# Build Gradio interface
|
| 238 |
+
# Theme and CSS are PASSED IN LAUNCH()
|
| 239 |
with gr.Blocks(fill_width=True) as demo:
|
| 240 |
|
| 241 |
# Header with IDs for CSS targeting
|
|
|
|
| 255 |
with gr.TabItem("Edit Image", id=0):
|
| 256 |
with gr.Row():
|
| 257 |
# Left Column: Inputs
|
|
|
|
| 258 |
with gr.Column(scale=1, variant="panel"):
|
| 259 |
gr.Markdown("### 🖼️ Input Image & Controls")
|
| 260 |
input_image = gr.Image(
|
|
|
|
| 316 |
max_lines=6
|
| 317 |
)
|
| 318 |
|
| 319 |
+
# Hidden Sliders
|
| 320 |
t2i_width = gr.Slider(
|
| 321 |
minimum=512,
|
| 322 |
maximum=2048,
|
|
|
|
| 391 |
""")
|
| 392 |
|
| 393 |
# Launch the app
|
| 394 |
+
# THEME and CSS moved here for Gradio 6 Compliance
|
| 395 |
if __name__ == "__main__":
|
| 396 |
demo.launch(
|
| 397 |
mcp_server=True,
|