Spaces:
Running
Running
Update src/mcp_server/server.py
Browse files- src/mcp_server/server.py +19 -3
src/mcp_server/server.py
CHANGED
|
@@ -609,14 +609,30 @@ with gr.Blocks(title="MCePtion") as demo:
|
|
| 609 |
readme_content = readme_content[end_index + 3:].lstrip()
|
| 610 |
except Exception:
|
| 611 |
pass
|
| 612 |
-
except Exception as e:
|
| 613 |
-
readme_content = f"Unable to load Readme.md: {str(e)}"
|
| 614 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 615 |
with gr.Tab("EXAMPLES"):
|
| 616 |
# Lecture du fichier Examples.md
|
| 617 |
example_content = ""
|
| 618 |
try:
|
| 619 |
-
with open("
|
| 620 |
example_content = f.read()
|
| 621 |
except Exception as e:
|
| 622 |
example_content = f"Unable to load Examples.md: {str(e)}"
|
|
|
|
| 609 |
readme_content = readme_content[end_index + 3:].lstrip()
|
| 610 |
except Exception:
|
| 611 |
pass
|
|
|
|
|
|
|
| 612 |
|
| 613 |
+
except Exception as e:
|
| 614 |
+
readme_content = f"Unable to load README.md: {str(e)}"
|
| 615 |
+
# Le conteneur Row pour aligner les 3 colonnes horizontalement
|
| 616 |
+
with gr.Row():
|
| 617 |
+
|
| 618 |
+
# 1. Colonne vide à gauche (1 part)
|
| 619 |
+
# min_width=0 est important pour que la colonne puisse rétrécir si besoin
|
| 620 |
+
with gr.Column(scale=1, min_width=0):
|
| 621 |
+
pass
|
| 622 |
+
|
| 623 |
+
# 2. Colonne centrale avec le contenu (3 parts)
|
| 624 |
+
with gr.Column(scale=3):
|
| 625 |
+
gr.Markdown(readme_content)
|
| 626 |
+
|
| 627 |
+
# 3. Colonne vide à droite (1 part)
|
| 628 |
+
with gr.Column(scale=1, min_width=0):
|
| 629 |
+
pass
|
| 630 |
+
|
| 631 |
with gr.Tab("EXAMPLES"):
|
| 632 |
# Lecture du fichier Examples.md
|
| 633 |
example_content = ""
|
| 634 |
try:
|
| 635 |
+
with open("assets/Examples.MD", "r", encoding="utf-8") as f:
|
| 636 |
example_content = f.read()
|
| 637 |
except Exception as e:
|
| 638 |
example_content = f"Unable to load Examples.md: {str(e)}"
|