Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import json
|
|
| 5 |
import uvicorn
|
| 6 |
|
| 7 |
# Import the analysis function from vision_core.py
|
| 8 |
-
from vision_core import
|
| 9 |
|
| 10 |
app = FastAPI(title="Vision Frame Analyzer API", version="1.0")
|
| 11 |
|
|
@@ -43,7 +43,7 @@ async def startup_event():
|
|
| 43 |
print("[*] 🚀 Starting initial analysis in background on startup...")
|
| 44 |
|
| 45 |
# Start a daemon thread for analyze_all
|
| 46 |
-
analysis_thread = threading.Thread(target=
|
| 47 |
analysis_thread.start()
|
| 48 |
|
| 49 |
print("[*] Initial analysis thread started. App ready. Visit /outputs/{course_name} to fetch results.")
|
|
|
|
| 5 |
import uvicorn
|
| 6 |
|
| 7 |
# Import the analysis function from vision_core.py
|
| 8 |
+
from vision_core import analyze_all_courses, OUTPUT_DIR
|
| 9 |
|
| 10 |
app = FastAPI(title="Vision Frame Analyzer API", version="1.0")
|
| 11 |
|
|
|
|
| 43 |
print("[*] 🚀 Starting initial analysis in background on startup...")
|
| 44 |
|
| 45 |
# Start a daemon thread for analyze_all
|
| 46 |
+
analysis_thread = threading.Thread(target=analyze_all_courses, daemon=True)
|
| 47 |
analysis_thread.start()
|
| 48 |
|
| 49 |
print("[*] Initial analysis thread started. App ready. Visit /outputs/{course_name} to fetch results.")
|