Spaces:
Sleeping
Sleeping
Deploy final complete A1D MCP Server
Browse files- Use original app.py with full functionality
- Enable MCP server with mcp_server=True parameter
- Support all 6 AI tools with complete interfaces:
* Background Removal
* Image Upscaler (2x/4x/8x/16x)
* Video Upscaler
* Image Vectorization
* Image Extension
* Image Generator
- Add comprehensive startup logging
- Ready for production deployment on Hugging Face Spaces
README.md
CHANGED
|
@@ -5,7 +5,7 @@ colorFrom: blue
|
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.33.0
|
| 8 |
-
app_file:
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
tags:
|
|
|
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.33.0
|
| 8 |
+
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
tags:
|
app.py
CHANGED
|
@@ -436,12 +436,24 @@ if __name__ == "__main__":
|
|
| 436 |
print("Please set your API key: export A1D_API_KEY=your_api_key_here")
|
| 437 |
exit(1)
|
| 438 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
# Create and launch the app
|
| 440 |
demo = create_gradio_app()
|
| 441 |
|
| 442 |
-
# Launch the Gradio app
|
| 443 |
demo.launch(
|
| 444 |
server_name=GRADIO_CONFIG["server_name"],
|
| 445 |
server_port=GRADIO_CONFIG["server_port"],
|
| 446 |
-
share=GRADIO_CONFIG["share"]
|
|
|
|
| 447 |
)
|
|
|
|
| 436 |
print("Please set your API key: export A1D_API_KEY=your_api_key_here")
|
| 437 |
exit(1)
|
| 438 |
|
| 439 |
+
print("π Starting A1D MCP Server...")
|
| 440 |
+
print("=" * 50)
|
| 441 |
+
print("β
API key found")
|
| 442 |
+
print(f"π― Title: {GRADIO_CONFIG['title']}")
|
| 443 |
+
print(
|
| 444 |
+
f"π Server: http://{GRADIO_CONFIG['server_name']}:{GRADIO_CONFIG['server_port']}")
|
| 445 |
+
print(
|
| 446 |
+
f"π§ MCP Endpoint: http://{GRADIO_CONFIG['server_name']}:{GRADIO_CONFIG['server_port']}/gradio_api/mcp/sse")
|
| 447 |
+
print(f"π Available Tools: {len(TOOLS_CONFIG)} AI tools")
|
| 448 |
+
print("=" * 50)
|
| 449 |
+
|
| 450 |
# Create and launch the app
|
| 451 |
demo = create_gradio_app()
|
| 452 |
|
| 453 |
+
# Launch the Gradio app with MCP server enabled
|
| 454 |
demo.launch(
|
| 455 |
server_name=GRADIO_CONFIG["server_name"],
|
| 456 |
server_port=GRADIO_CONFIG["server_port"],
|
| 457 |
+
share=GRADIO_CONFIG["share"],
|
| 458 |
+
mcp_server=True # Enable MCP server functionality
|
| 459 |
)
|