Commit
·
26de7cd
1
Parent(s):
3ae64f0
fix: Move theme parameter to launch() method for Gradio 6
Browse files- Remove theme from gr.Blocks() (not supported)
- Add theme configuration before demo.launch()
- Pass theme parameter to demo.launch() (Gradio 6 requirement)
- Ocean-inspired theme: blue/cyan colors with Inter font
- Fixes: TypeError: BlockContext.__init__() got an unexpected keyword argument 'theme'
app.py
CHANGED
|
@@ -83,21 +83,8 @@ except ValueError:
|
|
| 83 |
def create_gradio_ui():
|
| 84 |
"""Create Gradio UI for testing MCP tools"""
|
| 85 |
|
| 86 |
-
#
|
| 87 |
-
|
| 88 |
-
primary_hue="blue",
|
| 89 |
-
secondary_hue="cyan",
|
| 90 |
-
neutral_hue="slate",
|
| 91 |
-
font=gr.themes.GoogleFont("Inter"),
|
| 92 |
-
).set(
|
| 93 |
-
body_background_fill="*neutral_50",
|
| 94 |
-
body_background_fill_dark="*neutral_900",
|
| 95 |
-
button_primary_background_fill="*primary_500",
|
| 96 |
-
button_primary_background_fill_hover="*primary_600",
|
| 97 |
-
button_primary_text_color="white",
|
| 98 |
-
)
|
| 99 |
-
|
| 100 |
-
with gr.Blocks(title="TraceMind MCP Server", theme=theme) as demo:
|
| 101 |
gr.Markdown("""
|
| 102 |
# 🤖 TraceMind MCP Server
|
| 103 |
|
|
|
|
| 83 |
def create_gradio_ui():
|
| 84 |
"""Create Gradio UI for testing MCP tools"""
|
| 85 |
|
| 86 |
+
# Note: In Gradio 6, theme is passed to launch(), not Blocks()
|
| 87 |
+
with gr.Blocks(title="TraceMind MCP Server") as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
gr.Markdown("""
|
| 89 |
# 🤖 TraceMind MCP Server
|
| 90 |
|