Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -181,8 +181,8 @@ gradio_app = gr.Interface(
|
|
| 181 |
fn=gradio_interface,
|
| 182 |
inputs=gr.Textbox(label="Your Message"),
|
| 183 |
outputs=gr.Textbox(label="MCP Response"),
|
| 184 |
-
title="
|
| 185 |
-
description="
|
| 186 |
)
|
| 187 |
|
| 188 |
# Mount Gradio on FastAPI
|
|
@@ -194,11 +194,6 @@ app = gr.mount_gradio_app(app, gradio_app, path="/ui")
|
|
| 194 |
async def redirect_to_gradio():
|
| 195 |
return RedirectResponse(url="/ui")
|
| 196 |
|
| 197 |
-
# Optional: Keep the health check at a different path if still desired
|
| 198 |
-
@app.get("/health_status")
|
| 199 |
-
def health_check():
|
| 200 |
-
return {"status": "active", "components": ["fastapi", "gemini", "weather-api", "gradio"]}
|
| 201 |
-
# === NEW CODE ENDS HERE ===
|
| 202 |
|
| 203 |
if __name__ == "__main__":
|
| 204 |
import uvicorn
|
|
|
|
| 181 |
fn=gradio_interface,
|
| 182 |
inputs=gr.Textbox(label="Your Message"),
|
| 183 |
outputs=gr.Textbox(label="MCP Response"),
|
| 184 |
+
title="Live Weather Server",
|
| 185 |
+
description="MCP Server with Gemini AI and OpenWeatherMap API"
|
| 186 |
)
|
| 187 |
|
| 188 |
# Mount Gradio on FastAPI
|
|
|
|
| 194 |
async def redirect_to_gradio():
|
| 195 |
return RedirectResponse(url="/ui")
|
| 196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
|
| 198 |
if __name__ == "__main__":
|
| 199 |
import uvicorn
|