Spaces:
Sleeping
Sleeping
Update app.py
Browse filesRemoved ones I don't need.
app.py
CHANGED
|
@@ -84,17 +84,12 @@ from Modules.Web_Fetch import build_interface as build_fetch_interface
|
|
| 84 |
from Modules.Web_Search import build_interface as build_search_interface
|
| 85 |
from Modules.Code_Interpreter import build_interface as build_code_interface
|
| 86 |
from Modules.Memory_Manager import build_interface as build_memory_interface
|
| 87 |
-
from Modules.Generate_Speech import build_interface as build_speech_interface
|
| 88 |
-
from Modules.Generate_Image import build_interface as build_image_interface
|
| 89 |
-
from Modules.Generate_Video import build_interface as build_video_interface
|
| 90 |
from Modules.Deep_Research import build_interface as build_research_interface
|
| 91 |
from Modules.File_System import build_interface as build_fs_interface
|
| 92 |
-
from Modules.Obsidian_Vault import build_interface as build_obsidian_interface
|
| 93 |
from Modules.Shell_Command import build_interface as build_shell_interface
|
| 94 |
|
| 95 |
# Optional environment flags used to conditionally show API schemas (unchanged behavior)
|
| 96 |
HF_IMAGE_TOKEN = bool(os.getenv("HF_READ_TOKEN"))
|
| 97 |
-
HF_VIDEO_TOKEN = bool(os.getenv("HF_READ_TOKEN") or os.getenv("HF_TOKEN"))
|
| 98 |
HF_TEXTGEN_TOKEN = bool(os.getenv("HF_READ_TOKEN") or os.getenv("HF_TOKEN"))
|
| 99 |
|
| 100 |
# CSS copied from prior app.py to preserve exact look-and-feel
|
|
@@ -324,13 +319,9 @@ fetch_interface = build_fetch_interface()
|
|
| 324 |
concise_interface = build_search_interface()
|
| 325 |
code_interface = build_code_interface()
|
| 326 |
memory_interface = build_memory_interface()
|
| 327 |
-
kokoro_interface = build_speech_interface()
|
| 328 |
-
image_generation_interface = build_image_interface()
|
| 329 |
-
video_generation_interface = build_video_interface()
|
| 330 |
deep_research_interface = build_research_interface()
|
| 331 |
fs_interface = build_fs_interface()
|
| 332 |
shell_interface = build_shell_interface()
|
| 333 |
-
obsidian_interface = build_obsidian_interface()
|
| 334 |
|
| 335 |
_interfaces = [
|
| 336 |
fetch_interface,
|
|
@@ -338,11 +329,7 @@ _interfaces = [
|
|
| 338 |
code_interface,
|
| 339 |
shell_interface,
|
| 340 |
fs_interface,
|
| 341 |
-
obsidian_interface,
|
| 342 |
memory_interface,
|
| 343 |
-
kokoro_interface,
|
| 344 |
-
image_generation_interface,
|
| 345 |
-
video_generation_interface,
|
| 346 |
deep_research_interface,
|
| 347 |
]
|
| 348 |
_tab_names = [
|
|
@@ -351,11 +338,7 @@ _tab_names = [
|
|
| 351 |
"Code Interpreter",
|
| 352 |
"Shell Command",
|
| 353 |
"File System",
|
| 354 |
-
"Obsidian Vault",
|
| 355 |
"Memory Manager",
|
| 356 |
-
"Generate Speech",
|
| 357 |
-
"Generate Image",
|
| 358 |
-
"Generate Video",
|
| 359 |
"Deep Research",
|
| 360 |
]
|
| 361 |
|
|
@@ -373,7 +356,7 @@ with gr.Blocks(title="Nymbo/Tools MCP") as demo:
|
|
| 373 |
<div class="info-card__body">
|
| 374 |
<h3>Enable Image Gen, Video Gen, and Deep Research</h3>
|
| 375 |
<p>
|
| 376 |
-
The <code>
|
| 377 |
<code>HF_READ_TOKEN</code> set as a secret or environment variable.
|
| 378 |
</p>
|
| 379 |
<ul class="info-list">
|
|
@@ -429,31 +412,10 @@ python app.py</code></pre>
|
|
| 429 |
<section class="info-card">
|
| 430 |
<div class="info-card__icon">🛠️</div>
|
| 431 |
<div class="info-card__body">
|
| 432 |
-
<h3>Tool Notes & Kokoro Voice Legend</h3>
|
| 433 |
<p>
|
| 434 |
No authentication required for: <code>Web_Fetch</code>, <code>Web_Search</code>,
|
| 435 |
-
<code>Code_Interpreter</code>, <code>Memory_Manager</code>, <code>
|
| 436 |
</p>
|
| 437 |
-
<p><strong>Kokoro voice prefixes</strong></p>
|
| 438 |
-
<ul class="info-list" style="display:grid;grid-template-columns:repeat(2,minmax(160px,1fr));gap:6px 16px;">
|
| 439 |
-
<li><code>af</code> — American female</li>
|
| 440 |
-
<li><code>am</code> — American male</li>
|
| 441 |
-
<li><code>bf</code> — British female</li>
|
| 442 |
-
<li><code>bm</code> — British male</li>
|
| 443 |
-
<li><code>ef</code> — European female</li>
|
| 444 |
-
<li><code>em</code> — European male</li>
|
| 445 |
-
<li><code>hf</code> — Hindi female</li>
|
| 446 |
-
<li><code>hm</code> — Hindi male</li>
|
| 447 |
-
<li><code>if</code> — Italian female</li>
|
| 448 |
-
<li><code>im</code> — Italian male</li>
|
| 449 |
-
<li><code>jf</code> — Japanese female</li>
|
| 450 |
-
<li><code>jm</code> — Japanese male</li>
|
| 451 |
-
<li><code>pf</code> — Portuguese female</li>
|
| 452 |
-
<li><code>pm</code> — Portuguese male</li>
|
| 453 |
-
<li><code>zf</code> — Chinese female</li>
|
| 454 |
-
<li><code>zm</code> — Chinese male</li>
|
| 455 |
-
<li><code>ff</code> — French female</li>
|
| 456 |
-
</ul>
|
| 457 |
</div>
|
| 458 |
</section>
|
| 459 |
</div>
|
|
|
|
| 84 |
from Modules.Web_Search import build_interface as build_search_interface
|
| 85 |
from Modules.Code_Interpreter import build_interface as build_code_interface
|
| 86 |
from Modules.Memory_Manager import build_interface as build_memory_interface
|
|
|
|
|
|
|
|
|
|
| 87 |
from Modules.Deep_Research import build_interface as build_research_interface
|
| 88 |
from Modules.File_System import build_interface as build_fs_interface
|
|
|
|
| 89 |
from Modules.Shell_Command import build_interface as build_shell_interface
|
| 90 |
|
| 91 |
# Optional environment flags used to conditionally show API schemas (unchanged behavior)
|
| 92 |
HF_IMAGE_TOKEN = bool(os.getenv("HF_READ_TOKEN"))
|
|
|
|
| 93 |
HF_TEXTGEN_TOKEN = bool(os.getenv("HF_READ_TOKEN") or os.getenv("HF_TOKEN"))
|
| 94 |
|
| 95 |
# CSS copied from prior app.py to preserve exact look-and-feel
|
|
|
|
| 319 |
concise_interface = build_search_interface()
|
| 320 |
code_interface = build_code_interface()
|
| 321 |
memory_interface = build_memory_interface()
|
|
|
|
|
|
|
|
|
|
| 322 |
deep_research_interface = build_research_interface()
|
| 323 |
fs_interface = build_fs_interface()
|
| 324 |
shell_interface = build_shell_interface()
|
|
|
|
| 325 |
|
| 326 |
_interfaces = [
|
| 327 |
fetch_interface,
|
|
|
|
| 329 |
code_interface,
|
| 330 |
shell_interface,
|
| 331 |
fs_interface,
|
|
|
|
| 332 |
memory_interface,
|
|
|
|
|
|
|
|
|
|
| 333 |
deep_research_interface,
|
| 334 |
]
|
| 335 |
_tab_names = [
|
|
|
|
| 338 |
"Code Interpreter",
|
| 339 |
"Shell Command",
|
| 340 |
"File System",
|
|
|
|
| 341 |
"Memory Manager",
|
|
|
|
|
|
|
|
|
|
| 342 |
"Deep Research",
|
| 343 |
]
|
| 344 |
|
|
|
|
| 356 |
<div class="info-card__body">
|
| 357 |
<h3>Enable Image Gen, Video Gen, and Deep Research</h3>
|
| 358 |
<p>
|
| 359 |
+
The <code>Deep_Research</code> tools require a
|
| 360 |
<code>HF_READ_TOKEN</code> set as a secret or environment variable.
|
| 361 |
</p>
|
| 362 |
<ul class="info-list">
|
|
|
|
| 412 |
<section class="info-card">
|
| 413 |
<div class="info-card__icon">🛠️</div>
|
| 414 |
<div class="info-card__body">
|
|
|
|
| 415 |
<p>
|
| 416 |
No authentication required for: <code>Web_Fetch</code>, <code>Web_Search</code>,
|
| 417 |
+
<code>Code_Interpreter</code>, <code>Memory_Manager</code>, <code>File_System</code>, and <code>Shell_Command</code>.
|
| 418 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 419 |
</div>
|
| 420 |
</section>
|
| 421 |
</div>
|