Nymbo commited on
Commit
63e7ff5
·
verified ·
1 Parent(s): fc8145f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -1,4 +1,3 @@
1
- # File: main/app.py
2
  # Purpose: One Space that offers four tools/tabs (all exposed as MCP tools):
3
  # 1) Fetch — extract relevant page content (title, metadata, clean text, hyperlinks)
4
  # 2) DuckDuckGo Search — compact JSONL search output (short keys to minimize tokens)
@@ -344,13 +343,8 @@ def Fetch_Webpage( # <-- MCP tool #1 (Fetch)
344
  return md or "No content could be extracted."
345
 
346
 
347
- # ===============================
348
- # DuckDuckGo Search (JSONL lines)
349
- # ===============================
350
-
351
-
352
  # ============================================
353
- # Concise DDG: ultra-succinct JSONL for tokens
354
  # ============================================
355
 
356
  def Search_DuckDuckGo( # <-- MCP tool #2 (DDG Search)
@@ -416,7 +410,7 @@ def Search_DuckDuckGo( # <-- MCP tool #2 (DDG Search)
416
 
417
 
418
  # ======================================
419
- # Code Execution: Python (MCP tool #6)
420
  # ======================================
421
 
422
  def Execute_Python(code: Annotated[str, "Python source code to run; stdout is captured and returned."]) -> str:
@@ -605,7 +599,7 @@ concise_interface = gr.Interface(
605
  submit_btn="Search",
606
  )
607
 
608
- ## Removed Structured, Raw, and Sitemap tabs
609
 
610
  # --- Execute Python tab (simple code interpreter) ---
611
  code_interface = gr.Interface(
@@ -657,7 +651,7 @@ kokoro_interface = gr.Interface(
657
  outputs=gr.Audio(label="Audio", type="numpy"),
658
  title="Kokoro TTS",
659
  description=(
660
- "<div style=\"text-align:center\">Generate English speech with Kokoro-82M. 30 Second max output. Runs on CPU.</div>"
661
  ),
662
  api_description=(
663
  "Synthesize speech from text using Kokoro-82M. Returns (sample_rate, waveform) suitable for playback."
 
 
1
  # Purpose: One Space that offers four tools/tabs (all exposed as MCP tools):
2
  # 1) Fetch — extract relevant page content (title, metadata, clean text, hyperlinks)
3
  # 2) DuckDuckGo Search — compact JSONL search output (short keys to minimize tokens)
 
343
  return md or "No content could be extracted."
344
 
345
 
 
 
 
 
 
346
  # ============================================
347
+ # DuckDuckGo Search: ultra-succinct JSONL
348
  # ============================================
349
 
350
  def Search_DuckDuckGo( # <-- MCP tool #2 (DDG Search)
 
410
 
411
 
412
  # ======================================
413
+ # Code Execution: Python (MCP tool #3)
414
  # ======================================
415
 
416
  def Execute_Python(code: Annotated[str, "Python source code to run; stdout is captured and returned."]) -> str:
 
599
  submit_btn="Search",
600
  )
601
 
602
+ ##
603
 
604
  # --- Execute Python tab (simple code interpreter) ---
605
  code_interface = gr.Interface(
 
651
  outputs=gr.Audio(label="Audio", type="numpy"),
652
  title="Kokoro TTS",
653
  description=(
654
+ "<div style=\"text-align:center\">Generate English speech with Kokoro-82M. 30 second max output. Runs on CPU or CUDA if available.</div>"
655
  ),
656
  api_description=(
657
  "Synthesize speech from text using Kokoro-82M. Returns (sample_rate, waveform) suitable for playback."