Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -658,12 +658,12 @@ def create_interface():
|
|
| 658 |
return demo
|
| 659 |
|
| 660 |
# ----------- Main Entry Point -----------
|
| 661 |
-
|
| 662 |
-
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
| 666 |
-
|
| 667 |
-
|
| 668 |
-
|
| 669 |
-
|
|
|
|
| 658 |
return demo
|
| 659 |
|
| 660 |
# ----------- Main Entry Point -----------
|
| 661 |
+
|
| 662 |
+
# Load config and KB at import time
|
| 663 |
+
config_file = os.getenv("RAG_CONFIG", "config.yaml")
|
| 664 |
+
config = Config(config_file)
|
| 665 |
+
kb = KBIndex()
|
| 666 |
+
ensure_index()
|
| 667 |
+
|
| 668 |
+
# Expose `demo` for Hugging Face Spaces
|
| 669 |
+
demo = create_interface()
|