Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,18 @@ from pydantic import BaseModel
|
|
| 5 |
import uvicorn
|
| 6 |
from agent.core import CodeAgent
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# ============================================
|
| 12 |
# FASTAPI FÜR PROJEKTE
|
|
|
|
| 5 |
import uvicorn
|
| 6 |
from agent.core import CodeAgent
|
| 7 |
|
| 8 |
+
|
| 9 |
+
# Agent nur initialisieren, wenn aktiviert
|
| 10 |
+
AGENT_ACTIVE = True # Auf False setzen zum Deaktivieren
|
| 11 |
+
|
| 12 |
+
if AGENT_ACTIVE:
|
| 13 |
+
# Agenten Instanziierung - Umgebung für Agent aufbauen!
|
| 14 |
+
agent = CodeAgent(api_key=None, dummy_mode=True, project="bild")
|
| 15 |
+
print("✅ Agent aktiviert")
|
| 16 |
+
else:
|
| 17 |
+
agent = None # Agent deaktiviert
|
| 18 |
+
print("⚠️ Agent ist deaktiviert - API läuft im Dummy-Modus")
|
| 19 |
+
|
| 20 |
|
| 21 |
# ============================================
|
| 22 |
# FASTAPI FÜR PROJEKTE
|