gradio & streamlit & dash - peter-xbs/CommonCodes GitHub Wiki
快速AI应用框架对比
1. gradio
- 主要使用场景 可交互小Demo,使用非常简单,几行代码可快速构建一个demo应用,在huggingface被广泛使用,通过搭建一个简易app.py即可在huggingface space上快速启动一个Playground应用
- 中文文档参考:https://github.com/gradio-app/gradio/tree/main/readme_files/zh-cn#readme
- demo示例:https://github.com/gradio-app/awesome-demos
- B站学习视频: https://www.bilibili.com/video/BV1BN411w7Ub/?spm_id_from=333.337.search-card.all.click&vd_source=15dc73e130f0a4a16634ffdbdb12b429
- text generateion web UI: https://github.com/oobabooga/text-generation-webui 使用gradio框架,添加了HTML、markdown等功能,使得对话可视化效果更佳
- 学习优先级:1
2. streamlit
- 相比gradio功能更加丰富些,但相比gradio更复杂一些,运行慢一些
- demo示例列表: https://streamlit.io/gallery?category=trending
- 学习优先级:2
3. dash
- dash 基于Plotly + React + Flask,更像一个Python后端
- dash相当于使用Python编写htl+后端,因此代码会比较冗长,同时也不适合网站开发者,和现代主流前后端开发理念有所违和,不适合大型项目
- dash demo列表: https://dash.gallery/Portal/ 特别适合科学绘图和展示