thecollabagepatch commited on
Commit
65f69a6
·
1 Parent(s): 93c14ca

fixing docs link for gradio interface

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -820,6 +820,10 @@ def build_style_vector(
820
  # ----------------------------
821
  app = FastAPI()
822
 
 
 
 
 
823
  app.add_middleware(
824
  CORSMiddleware,
825
  allow_origins=["*"], # or lock to your domain(s)
@@ -2118,7 +2122,7 @@ def read_root():
2118
  """
2119
  return Response(content=html_content, media_type="text/html")
2120
 
2121
- @app.get("/documentation")
2122
- def documentation():
2123
- interface = create_documentation_interface()
2124
- return interface.launch(share=False, server_name="0.0.0.0", server_port=None, prevent_thread_lock=True)
 
820
  # ----------------------------
821
  app = FastAPI()
822
 
823
+ # Add this after creating your FastAPI app
824
+ interface = create_documentation_interface()
825
+ app = gr.mount_gradio_app(app, interface, path="/documentation")
826
+
827
  app.add_middleware(
828
  CORSMiddleware,
829
  allow_origins=["*"], # or lock to your domain(s)
 
2122
  """
2123
  return Response(content=html_content, media_type="text/html")
2124
 
2125
+ # @app.get("/documentation")
2126
+ # def documentation():
2127
+ # interface = create_documentation_interface()
2128
+ # return interface.launch(share=False, server_name="0.0.0.0", server_port=None, prevent_thread_lock=True)