Spaces:
Paused
Paused
adding information accordion to make the authentication and privacy stuff more clear
Browse files1047 unmodified lines104810491050105110521053105410551056105710581059106010613 unmodified lines10651066106710681069107010714 unmodified lines1076107710781079108010811082479 unmodified lines15621563156415651566156715681569157015711572157315741047 unmodified lines)CSS_STYLES = """.gradio-container h1 {text-align: center;/* Ensure main title appears first, then our two subtitle lines */display: grid;justify-items: center;}/* Place bold tools list on line 2, normal auth note on line 3 (below title) */.gradio-container h1::before {grid-row: 2;content: "Fetch Webpage | Search DuckDuckGo | Python Interpreter | Memory Manager | Kokoro TTS | Image Generation | Video Generation";display: block;3 unmodified linesmargin-top: 6px;white-space: pre-wrap;}.gradio-container h1::after {grid-row: 3;content: "General purpose tools useful for any agent.";display: block;4 unmodified lineswhite-space: pre-wrap;}/* Remove inside tab panels so it doesn't duplicate under each tool title */.gradio-container [role=\"tabpanel\"] h1::before,.gradio-container [role=\"tabpanel\"] h1::after {content: none !important;479 unmodified lines"Video Generation",]demo = gr.TabbedInterface(interface_list=_interfaces,tab_names=_tab_names,title="Tools MCP",theme="Nymbo/Nymbo_Theme",css=CSS_STYLES,)# Launch the UI and expose all functions as MCP tools in one serverif __name__ == "__main__":1047 unmodified lines1048104910501051105210531054105510561057105810591060106110623 unmodified lines10661067106810691070107110724 unmodified lines1077107810791080108110821083479 unmodified lines1563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951047 unmodified lines)CSS_STYLES = """/* Style only the top-level app title to avoid affecting headings elsewhere */.app-title {text-align: center;/* Ensure main title appears first, then our two subtitle lines */display: grid;justify-items: center;}/* Place bold tools list on line 2, normal auth note on line 3 (below title) */.app-title::before {grid-row: 2;content: "Fetch Webpage | Search DuckDuckGo | Python Interpreter | Memory Manager | Kokoro TTS | Image Generation | Video Generation";display: block;3 unmodified linesmargin-top: 6px;white-space: pre-wrap;}.app-title::after {grid-row: 3;content: "General purpose tools useful for any agent.";display: block;4 unmodified lineswhite-space: pre-wrap;}/* Historical safeguard: if any h1 appears inside tabs, don't attach pseudo content */.gradio-container [role=\"tabpanel\"] h1::before,.gradio-container [role=\"tabpanel\"] h1::after {content: none !important;479 unmodified lines"Video Generation",]with gr.Blocks(title="Nymbo/Tools MCP", theme="Nymbo/Nymbo_Theme", css=CSS_STYLES) as demo:# Page title (scoped styling via .app-title to avoid affecting other headings)gr.HTML("<h1 class='app-title'>Nymbo/Tools MCP</h1>")# Collapsed Information accordion (appears below subtitle and above tabs)with gr.Accordion("Information", open=False):gr.Markdown("""## Enable Image & Video GenerationThe `Generate_Image` and `Generate_Video` tools require a `HF_READ_TOKEN` present in environment variables (secrets). Please duplicate this space and provide an API key to enable them, or clone and run locally.Both tools are hidden as MCP tools without authentication to avoid cluttering context, but they remain visible in the Gradio UI.---## Persistent MemoriesMemories in this public HF space are written to the space's running container, and they are deleted when the space restarts. The contents are also visible to everyone. Do not store personal information in this public demo.When running locally, memories are stored to a `memories.json` file in the root of the repo. Please clone and run locally to keep your information private.""")# Existing tool tabsgr.TabbedInterface(interface_list=_interfaces, tab_names=_tab_names)# Launch the UI and expose all functions as MCP tools in one serverif __name__ == "__main__":
app.py+32-11