broadfield-dev commited on
Commit
79afc90
·
verified ·
1 Parent(s): cdbc09f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -142,10 +142,9 @@ def generate_atlas(
142
  mount_path = f"/{uuid.uuid4().hex}"
143
  atlas_app = make_server(atlas_dataset, static_path=static_path, duckdb_uri="wasm")
144
 
145
- # --- THIS IS THE FINAL FIX ---
146
- # Call mount_gradio_app from the gradio module 'gr'
147
- # and pass the 'app' Blocks instance as the first argument.
148
- gr.mount_gradio_app(app, atlas_app, path=mount_path)
149
 
150
  progress(1.0, desc="Done!")
151
  iframe_html = f"<iframe src='{mount_path}' width='100%' height='800px' frameborder='0'></iframe>"
 
142
  mount_path = f"/{uuid.uuid4().hex}"
143
  atlas_app = make_server(atlas_dataset, static_path=static_path, duckdb_uri="wasm")
144
 
145
+ # --- THIS IS THE FINAL, CORRECT METHOD ---
146
+ # The 'app' object from gr.Blocks() is a FastAPI app. We use its standard 'mount' method.
147
+ app.mount(mount_path, atlas_app)
 
148
 
149
  progress(1.0, desc="Done!")
150
  iframe_html = f"<iframe src='{mount_path}' width='100%' height='800px' frameborder='0'></iframe>"