davidefiocco/streamlit-fastapi-model-serving
关于
一个简单的 Web 应用示例,使用 Streamlit 和 FastAPI 提供 PyTorch 模型服务。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文streamlit-fastapi-model-serving
Simple example of usage of streamlit and FastAPI for ML model serving described on this blogpost and PyConES 2020 video.
When developing simple APIs that serve machine learning models, it can be useful to have both a backend (with API documentation) for other applications to call and a frontend for users to experiment with the functionality.
In this example, we serve an image semantic segmentation model using FastAPI for the backend service and streamlit for the frontend service. docker compose orchestrates the two services and allows communication between them.
To run the example in a machine running Docker and docker compose, run:
docker compose build
docker compose up
To visit the FastAPI documentation of the resulting service, visit http://localhost:8000/docs with a web browser.
To visit the streamlit UI, visit http://localhost:8501.
Logs can be inspected via:
docker compose logs
Debugging
To modify and debug the app, development in containers can be useful (and kind of fun!).
探索相关项目
加载中…