Spaces:
Runtime error
Runtime error
zetavg
commited on
Commit
•
9b019ea
1
Parent(s):
9bd8d8b
read server_name from config.yaml
Browse files
app.py
CHANGED
@@ -46,6 +46,9 @@ def main(
|
|
46 |
config_from_file = read_yaml_config()
|
47 |
if config_from_file:
|
48 |
for key, value in config_from_file.items():
|
|
|
|
|
|
|
49 |
if not hasattr(Config, key):
|
50 |
available_keys = [k for k in vars(Config) if not k.startswith('__')]
|
51 |
raise ValueError(f"Invalid config key '{key}' in config.yaml. Available keys: {', '.join(available_keys)}")
|
|
|
46 |
config_from_file = read_yaml_config()
|
47 |
if config_from_file:
|
48 |
for key, value in config_from_file.items():
|
49 |
+
if key == "server_name":
|
50 |
+
server_name = value
|
51 |
+
continue
|
52 |
if not hasattr(Config, key):
|
53 |
available_keys = [k for k in vars(Config) if not k.startswith('__')]
|
54 |
raise ValueError(f"Invalid config key '{key}' in config.yaml. Available keys: {', '.join(available_keys)}")
|