This is a demonstration of integrating FastAPI with Gradio to create and deploy an interactive web application.
-
Install Dependencies:
pip install fastapi uvicorn gradio
-
Run the Application:
Run the following command in terminal:
uvicorn run:app
Output will look like this:
INFO: Started server process [46964] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://127.0.0.1:8000
-
Access the App:
-
To view JSON statistics, open your web browser and go to http://127.0.0.1:8000.
-
To access the interactive gradio app UI, visit http://127.0.0.1:8000/gradio.
-