Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -659,18 +659,11 @@ def create_interface():
|
|
| 659 |
|
| 660 |
# ----------- Main Entry Point -----------
|
| 661 |
if __name__ == "__main__":
|
| 662 |
-
|
| 663 |
-
parser.add_argument('--config', type=str, default='config.yaml',
|
| 664 |
-
help='Path to configuration YAML file (default: config.yaml)')
|
| 665 |
-
args = parser.parse_args()
|
| 666 |
|
| 667 |
-
|
| 668 |
-
config = Config(args.config)
|
| 669 |
-
|
| 670 |
-
# Initialize KB with config
|
| 671 |
kb = KBIndex()
|
| 672 |
ensure_index()
|
| 673 |
|
| 674 |
-
# Create and launch interface
|
| 675 |
demo = create_interface()
|
| 676 |
demo.launch()
|
|
|
|
| 659 |
|
| 660 |
# ----------- Main Entry Point -----------
|
| 661 |
if __name__ == "__main__":
|
| 662 |
+
config_file = os.getenv('RAG_CONFIG', 'config.yaml')
|
|
|
|
|
|
|
|
|
|
| 663 |
|
| 664 |
+
config = Config(config_file)
|
|
|
|
|
|
|
|
|
|
| 665 |
kb = KBIndex()
|
| 666 |
ensure_index()
|
| 667 |
|
|
|
|
| 668 |
demo = create_interface()
|
| 669 |
demo.launch()
|