alan5543
commited on
Commit
·
2505ad5
1
Parent(s):
8bece0a
update
Browse files
app.py
CHANGED
@@ -97,9 +97,9 @@ async def run_dia_tts(prompt: str, space_id: str = "ysharma/Dia-1.6B") -> str:
|
|
97 |
async def main():
|
98 |
logger.info(f"Attempting to start GradioSpacesTools MCP server on http://{HOST_ADDRESS}:{HOST_PORT}")
|
99 |
try:
|
100 |
-
# CORRECT FIX: Use 'streamable-http' transport AND mcp.
|
101 |
# This function runs within an already existing asyncio loop (started by asyncio.run(main()))
|
102 |
-
await mcp.
|
103 |
except Exception as e:
|
104 |
logger.exception(f"Failed to start MCP server: {e}")
|
105 |
logger.info("GradioSpacesTools MCP server stopped.")
|
|
|
97 |
async def main():
|
98 |
logger.info(f"Attempting to start GradioSpacesTools MCP server on http://{HOST_ADDRESS}:{HOST_PORT}")
|
99 |
try:
|
100 |
+
# CORRECT FIX: Use 'streamable-http' transport AND mcp.run_async()
|
101 |
# This function runs within an already existing asyncio loop (started by asyncio.run(main()))
|
102 |
+
await mcp.run_async(transport='streamable-http')
|
103 |
except Exception as e:
|
104 |
logger.exception(f"Failed to start MCP server: {e}")
|
105 |
logger.info("GradioSpacesTools MCP server stopped.")
|