Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -400,19 +400,3 @@ async def store_interaction(
|
|
| 400 |
# Log error but don't raise it since this is a background task
|
| 401 |
print(f"Error storing interaction: {str(e)}")
|
| 402 |
|
| 403 |
-
if __name__ == "__main__":
|
| 404 |
-
import uvicorn
|
| 405 |
-
import os
|
| 406 |
-
|
| 407 |
-
# Check for required environment variables
|
| 408 |
-
if not GEMINI_API_KEY:
|
| 409 |
-
print("❌ Error: GEMINI_API_KEY environment variable is required")
|
| 410 |
-
print("🔑 Get your FREE Gemini API key at: https://aistudio.google.com/app/apikey")
|
| 411 |
-
exit(1)
|
| 412 |
-
|
| 413 |
-
print("🚀 Starting Gemini-Powered MCP Server...")
|
| 414 |
-
print(f"🤖 Using Google Gemini AI (gemini-1.5-flash)")
|
| 415 |
-
print(f"🔧 Server: Gemini MCP Server")
|
| 416 |
-
|
| 417 |
-
port = int(os.getenv("PORT", 7860)) # <--- this line is key
|
| 418 |
-
uvicorn.run(app, host="0.0.0.0", port=port)
|
|
|
|
| 400 |
# Log error but don't raise it since this is a background task
|
| 401 |
print(f"Error storing interaction: {str(e)}")
|
| 402 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|