Spaces:
Sleeping
Sleeping
harrytarlton commited on
Commit ·
f149b66
1
Parent(s): 093490a
Update app.py
Browse files
app.py
CHANGED
|
@@ -124,7 +124,7 @@ class NAMProcessor:
|
|
| 124 |
|
| 125 |
for nam_file in nam_files:
|
| 126 |
try:
|
| 127 |
-
with open(nam_file, 'r') as f:
|
| 128 |
data = json.load(f)
|
| 129 |
model_name = nam_file.stem
|
| 130 |
self.models[model_name] = {
|
|
@@ -809,7 +809,7 @@ def create_input_file_html(files):
|
|
| 809 |
</div>
|
| 810 |
</div>
|
| 811 |
<script>
|
| 812 |
-
inputFiles = {json.dumps(file_data)};
|
| 813 |
// Re-attach the click handler after HTML update
|
| 814 |
setTimeout(() => {{
|
| 815 |
const importBtn = document.getElementById('import-btn-header');
|
|
@@ -922,7 +922,7 @@ def create_processed_file_html(files):
|
|
| 922 |
{file_items_html}
|
| 923 |
</div>
|
| 924 |
</div>
|
| 925 |
-
<script>processedFiles = {json.dumps(file_data)};</script>
|
| 926 |
"""
|
| 927 |
|
| 928 |
def update_status(message, processing=False):
|
|
|
|
| 124 |
|
| 125 |
for nam_file in nam_files:
|
| 126 |
try:
|
| 127 |
+
with open(nam_file, 'r', encoding='utf-8') as f:
|
| 128 |
data = json.load(f)
|
| 129 |
model_name = nam_file.stem
|
| 130 |
self.models[model_name] = {
|
|
|
|
| 809 |
</div>
|
| 810 |
</div>
|
| 811 |
<script>
|
| 812 |
+
inputFiles = {json.dumps(file_data).replace('</', '<\/')};
|
| 813 |
// Re-attach the click handler after HTML update
|
| 814 |
setTimeout(() => {{
|
| 815 |
const importBtn = document.getElementById('import-btn-header');
|
|
|
|
| 922 |
{file_items_html}
|
| 923 |
</div>
|
| 924 |
</div>
|
| 925 |
+
<script>processedFiles = {json.dumps(file_data).replace('</', '<\/')};</script>
|
| 926 |
"""
|
| 927 |
|
| 928 |
def update_status(message, processing=False):
|