File size: 566 Bytes
113afd7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import gradio as gr
from app import app as fastapi_app

# ---------------------------
# Root Gradio App
# ---------------------------
with gr.Blocks() as demo:
    gr.Markdown(
        """

        # Car Damage Detector



        Use the API endpoints directly.

        """
    )

# ---------------------------
# Mount FastAPI INSIDE Gradio
# ---------------------------
app = gr.mount_gradio_app(
    demo,            # Gradio must be the ROOT app
    fastapi_app,     # FastAPI is mounted inside it
    path="/"         # API available at /
)