You need to install both FastAPI and Streamlit in your working environment
From your the project root directory , run the following commands
cd fastapi
pip install -r requirements.txt
From your the project root directory , run the following commands
cd streamlit
pip install -r requirements.txt
1- Open a terminal for the FastAPI server, and run the following command:
cd fastapi
uvicorn server:app --reload
2- Open another terminal for the Streamlit client, and run the following command:
cd streamlit
streamlit run ui.py
Press Ctrl+Click on the http://192.168.2.11:8501 URL to open the app in your local browser
This implementation is inspired by the following blog post:
Simple example of usage of streamlit and FastAPI for ML model serving.