Spaces:
No application file
No application file
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,17 @@ from calls_analyser.ui.layout import build_demo
|
|
| 18 |
deps = build_dependencies()
|
| 19 |
handlers = UIHandlers(deps)
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
def _build_app():
|
| 23 |
return build_demo(deps, handlers)
|
|
@@ -136,4 +147,4 @@ except Exception as e:
|
|
| 136 |
|
| 137 |
|
| 138 |
if __name__ == "__main__":
|
| 139 |
-
demo.launch(
|
|
|
|
| 18 |
deps = build_dependencies()
|
| 19 |
handlers = UIHandlers(deps)
|
| 20 |
|
| 21 |
+
# Diagnostic: Check Supabase connection
|
| 22 |
+
print("DEBUG: Checking DB connection from app.py...")
|
| 23 |
+
try:
|
| 24 |
+
if hasattr(deps.analysis_service._cache, "_table"):
|
| 25 |
+
count = deps.analysis_service._cache._table.select("*", count="exact", head=True).execute().count
|
| 26 |
+
print(f"DEBUG: Successfully connected to Supabase. Table 'analysis_results' has {count} rows.")
|
| 27 |
+
else:
|
| 28 |
+
print("DEBUG: Using local file cache (not Supabase). Check configuration.")
|
| 29 |
+
except Exception as e:
|
| 30 |
+
print(f"DEBUG: Failed to query Supabase: {e}")
|
| 31 |
+
|
| 32 |
|
| 33 |
def _build_app():
|
| 34 |
return build_demo(deps, handlers)
|
|
|
|
| 147 |
|
| 148 |
|
| 149 |
if __name__ == "__main__":
|
| 150 |
+
demo.launch(allowed_paths=[os.environ.get("VOCHI_ALLOWED_PATH", "D:\\tmp")])
|