Vaishnav14220 commited on
Commit
7b3bfff
·
1 Parent(s): 5cd75da

Fix HF Spaces initialization by properly exposing demo variable

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1837,6 +1837,8 @@ async def get_nist_reactions(limit: int = Query(200, description="Maximum number
1837
  except Exception as e:
1838
  raise HTTPException(status_code=500, detail=str(e))
1839
 
1840
- # Mount Gradio app
1841
  demo = build_interface()
1842
- app = gr.mount_gradio_app(app, demo, path="/")
 
 
 
1837
  except Exception as e:
1838
  raise HTTPException(status_code=500, detail=str(e))
1839
 
1840
+ # Build Gradio interface
1841
  demo = build_interface()
1842
+
1843
+ # Mount Gradio to FastAPI for API endpoints
1844
+ fastapi_app = gr.mount_gradio_app(app, demo, path="/")