I have developed a machine learning app with fastapi as the backend, and streamlit as the frontend, it works on my local machine when I run it, i am abe to generate th predictions using the streamlit running on fastapi backend. But using docker , individually they work, I can generate predictions using fast API, and I can view the UI using streamlit, but if I want to generate the predictions on the streamlit UI, it generates this error:
ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with URL: /predict (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffffa808a0d0>: Failed to establish a new connection: [Errno 111] Connection refused'))
Where could the error be coming from?