AsyncCoder-10 commited on
Commit
5803783
·
verified ·
1 Parent(s): 5bfa65d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -19,12 +19,8 @@ demo = gr.Interface(
19
  )
20
 
21
  # Mount FastAPI onto Gradio's app
22
- # We also explicitly add the docs URL route so it's accessible
23
  demo.app.mount("/api", fastapi_app)
24
 
25
- # This line is the key: it exposes the /api/docs route on the main server
26
- # by re-mounting the FastAPI app's docs endpoint.
27
- demo.app.add_route("/api/docs", fastapi_app.docs_ui_router)
28
-
29
  if __name__ == "__main__":
30
  demo.launch(server_name="0.0.0.0", server_port=7860)
 
19
  )
20
 
21
  # Mount FastAPI onto Gradio's app
22
+ # This exposes your API at /api/moderate
23
  demo.app.mount("/api", fastapi_app)
24
 
 
 
 
 
25
  if __name__ == "__main__":
26
  demo.launch(server_name="0.0.0.0", server_port=7860)