Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
@@ -259,7 +259,7 @@ def create_model_from_folder(folder_path: str) -> DynamicModel:
|
|
259 |
file_path = os.path.join(root, file)
|
260 |
try:
|
261 |
layers = parse_xml_file(file_path)
|
262 |
-
section_name = os.path.basename(root)
|
263 |
sections[section_name].extend(layers)
|
264 |
except Exception as e:
|
265 |
print(f"Error processing {file_path}: {str(e)}")
|
|
|
259 |
file_path = os.path.join(root, file)
|
260 |
try:
|
261 |
layers = parse_xml_file(file_path)
|
262 |
+
section_name = os.path.basename(root).replace('.', '_') # Replace periods with underscores
|
263 |
sections[section_name].extend(layers)
|
264 |
except Exception as e:
|
265 |
print(f"Error processing {file_path}: {str(e)}")
|