Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -336,4 +336,18 @@ def create_ui():
|
|
336 |
function openFile(path, spaceId) {
|
337 |
const filePathInput = document.querySelector('input[data-testid="file_path_input"]');
|
338 |
const spaceIdInput = document.querySelector('input[data-testid="space_id_input"]');
|
339 |
-
if (filePathInput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
function openFile(path, spaceId) {
|
337 |
const filePathInput = document.querySelector('input[data-testid="file_path_input"]');
|
338 |
const spaceIdInput = document.querySelector('input[data-testid="space_id_input"]');
|
339 |
+
if (filePathInput && spaceIdInput) {
|
340 |
+
filePathInput.value = path;
|
341 |
+
spaceIdInput.value = spaceId;
|
342 |
+
filePathInput.dispatchEvent(new Event('change'));
|
343 |
+
}
|
344 |
+
}
|
345 |
+
</script>
|
346 |
+
""")
|
347 |
+
|
348 |
+
return demo
|
349 |
+
|
350 |
+
except Exception as e:
|
351 |
+
print(f"Error in create_ui: {str(e)}")
|
352 |
+
print(traceback.format_exc())
|
353 |
+
raise
|