[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-underneathall--pinferencia":3,"tool-underneathall--pinferencia":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":79,"owner_website":79,"owner_url":80,"languages":81,"stars":94,"forks":95,"last_commit_at":96,"license":97,"difficulty_score":98,"env_os":99,"env_gpu":99,"env_ram":99,"env_deps":100,"category_tags":108,"github_topics":109,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":130,"updated_at":131,"faqs":132,"releases":163},2577,"underneathall\u002Fpinferencia","pinferencia","Python + Inference - Model Deployment library in Python. Simplest model inference server ever.","Pinferencia 是一款专为 Python 打造的轻量级模型推理服务库，旨在成为史上最简单的模型部署方案。它解决了开发者在将机器学习或深度学习模型上线时，常面临的配置繁琐、依赖沉重以及缺乏直观交互界面等痛点。只需额外编写三行代码，用户即可快速为模型构建出包含图形界面（GUI）和 REST API 的完整服务，让原型验证和实际部署变得前所未有的高效。\n\n这款工具非常适合希望快速展示成果的研究人员、追求开发效率的算法工程师，以及需要轻量级解决方案的 Python 开发者。无论是自定义的简单函数，还是基于 Hugging Face、PyTorch 等框架的复杂深度学习模型，Pinferencia 都能轻松承载。其独特亮点在于“开箱即用”的精美图形界面、自动生成的交互式 API 文档，以及对 KServe 标准的支持，这意味着它能无缝兼容 Kubeflow、TF Serving 等主流平台。此外，Pinferencia 拥有 100% 的测试覆盖率，确保了服务的稳健性。如果你不想被重型框架束缚，又希望对服务保持完全控制，Pinferencia 将是理想的起步选择。","![Pinferencia](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Funderneathall_pinferencia_readme_4d59c43298ea.png)\n\n\u003Cp align=\"center\">\n    \u003Cem>Simple, but Powerful.\u003C\u002Fem>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Flgtm.com\u002Fprojects\u002Fg\u002Funderneathall\u002Fpinferencia\u002Fcontext:python\">\n        \u003Cimg alt=\"Language grade: Python\" src=\"https:\u002F\u002Fimg.shields.io\u002Flgtm\u002Fgrade\u002Fpython\u002Fg\u002Funderneathall\u002Fpinferencia.svg?logo=lgtm&logoWidth=18\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Funderneathall\u002Fpinferencia\">\n        \u003Cimg src=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Funderneathall\u002Fpinferencia\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg?token=M7J77E4IWC\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache_2.0-blue.svg\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fpinferencia\u002F\">\n        \u003Cimg alt=\"PyPI\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpinferencia?color=green\">\n    \u003C\u002Fa>\n    \u003Cimg alt=\"PyPI - Python Version\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fpinferencia\">\n\u003C\u002Fp>\n\n---\n\n\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fpinferencia.underneathall.app\" target=\"_blank\">\n    English Doc\n\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fpinferencia.underneathall.app\u002F0.2.1\u002Fzh\u002F\" target=\"_blank\">\n    中文文档\n\u003C\u002Fa>|\n\u003Ca href=\".\u002FReadme.zh.md\" target=\"_blank\">\n    中文Readme\n\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cem>Help wanted. Translation, rap lyrics, all wanted. Feel free to create an issue.\u003C\u002Fem>\n\u003C\u002Fp>\n\n---\n\n**Pinferencia** tries to be the simplest machine learning inference server ever!\n\n**Three extra lines and your model goes online**.\n\nServing a model with GUI and REST API has never been so easy.\n\n![Pinferencia-GUI](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Funderneathall_pinferencia_readme_686def6f2b7f.png)\n\n![Pinferencia-REST API](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Funderneathall_pinferencia_readme_f0701f0a986f.png)\n\nIf you want to\n\n- give your model a **GUI** and **REST API**\n- find a **simple but robust** way to serve your model\n- write **minimal** codes while maintain controls over you service\n- **avoid** any **heavy-weight** solutions\n- **compatible** with other tools\u002Fplatforms\n\nYou're at the right place.\n\n## Features\n\n**Pinferencia** features include:\n\n- **Fast to code, fast to go alive**. Minimal codes needed, minimal transformation needed. Just based on what you have.\n- **100% Test Coverage**: Both statement and branch coverages, no kidding. Have you ever known any model serving tool so seriously tested?\n- **Easy to use, easy to understand**.\n- **A pretty and clean GUI** out of box.\n- **Automatic API documentation page**. All API explained in details with online try-out feature.\n- **Serve any model**, even a single function can be served.\n- **Support Kserve API**, compatible with Kubeflow, TF Serving, Triton and TorchServe. There is no pain switching to or from them, and **Pinferencia** is much faster for prototyping!\n\n## Install\n\n### Recommend\n\n```bash\npip install \"pinferencia[streamlit]\"\n```\n\n### Backend Only\n\n```bash\npip install \"pinferencia\"\n```\n\n## Quick Start\n\n**Serve Any Model**\n\n```python title=\"app.py\"\nfrom pinferencia import Server\n\n\nclass MyModel:\n    def predict(self, data):\n        return sum(data)\n\n\nmodel = MyModel()\n\nservice = Server()\nservice.register(model_name=\"mymodel\", model=model, entrypoint=\"predict\")\n```\n\nJust run:\n\n```\npinfer app:service\n```\n\nHooray, your service is alive. Go to http:\u002F\u002F127.0.0.1:8501\u002F and have fun.\n\n**Any Deep Learning Models?** Just as easy. Simple train or load your model, and register it with the service. Go alive immediately.\n\n**Hugging Face**\n\nDetails: [HuggingFace Pipeline - Vision](https:\u002F\u002Fpinferencia.underneathall.app\u002Fml\u002Fhuggingface\u002Fpipeline\u002Fvision\u002F)\n\n```python title=\"app.py\" linenums=\"1\"\nfrom transformers import pipeline\n\nfrom pinferencia import Server\n\nvision_classifier = pipeline(task=\"image-classification\")\n\n\ndef predict(data):\n    return vision_classifier(images=data)\n\n\nservice = Server()\nservice.register(model_name=\"vision\", model=predict)\n\n```\n\n**Pytorch**\n\n```python title=\"app.py\"\nimport torch\n\nfrom pinferencia import Server\n\n\n# train your models\nmodel = \"...\"\n\n# or load your models (1)\n# from state_dict\nmodel = TheModelClass(*args, **kwargs)\nmodel.load_state_dict(torch.load(PATH))\n\n# entire model\nmodel = torch.load(PATH)\n\n# torchscript\nmodel = torch.jit.load('model_scripted.pt')\n\nmodel.eval()\n\nservice = Server()\nservice.register(model_name=\"mymodel\", model=model)\n```\n\n**Tensorflow**\n\n```python title=\"app.py\"\nimport tensorflow as tf\n\nfrom pinferencia import Server\n\n\n# train your models\nmodel = \"...\"\n\n# or load your models (1)\n# saved_model\nmodel = tf.keras.models.load_model('saved_model\u002Fmodel')\n\n# HDF5\nmodel = tf.keras.models.load_model('model.h5')\n\n# from weights\nmodel = create_model()\nmodel.load_weights('.\u002Fcheckpoints\u002Fmy_checkpoint')\nloss, acc = model.evaluate(test_images, test_labels, verbose=2)\n\nservice = Server()\nservice.register(model_name=\"mymodel\", model=model, entrypoint=\"predict\")\n```\n\nAny model of any framework will just work the same way. Now run `uvicorn app:service --reload` and enjoy!\n\n\n## Contributing\n\nIf you'd like to contribute, details are [here](.\u002FCONTRIBUTING.md)\n","![Pinferencia](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Funderneathall_pinferencia_readme_4d59c43298ea.png)\n\n\u003Cp align=\"center\">\n    \u003Cem>简单，但强大。\u003C\u002Fem>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Flgtm.com\u002Fprojects\u002Fg\u002Funderneathall\u002Fpinferencia\u002Fcontext:python\">\n        \u003Cimg alt=\"语言等级：Python\" src=\"https:\u002F\u002Fimg.shields.io\u002Flgtm\u002Fgrade\u002Fpython\u002Fg\u002Funderneathall\u002Fpinferencia.svg?logo=lgtm&logoWidth=18\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Funderneathall\u002Fpinferencia\">\n        \u003Cimg src=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Funderneathall\u002Fpinferencia\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg?token=M7J77E4IWC\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache_2.0-blue.svg\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fpinferencia\u002F\">\n        \u003Cimg alt=\"PyPI\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpinferencia?color=green\">\n    \u003C\u002Fa>\n    \u003Cimg alt=\"PyPI - Python 版本\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fpinferencia\">\n\u003C\u002Fp>\n\n---\n\n\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fpinferencia.underneathall.app\" target=\"_blank\">\n    英文文档\n\u003C\u002Fa> |\n\u003Ca href=\"https:\u002F\u002Fpinferencia.underneathall.app\u002F0.2.1\u002Fzh\u002F\" target=\"_blank\">\n    中文文档\n\u003C\u002Fa>|\n\u003Ca href=\".\u002FReadme.zh.md\" target=\"_blank\">\n    中文Readme\n\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Cem>诚邀帮助。翻译、说唱歌词等皆可。欢迎随时提交问题。\u003C\u002Fem>\n\u003C\u002Fp>\n\n---\n\n**Pinferencia** 致力于成为史上最简单的机器学习推理服务器！\n\n**只需三行代码，你的模型即可上线**。\n\n为模型提供 GUI 和 REST API 从未如此简单。\n\n![Pinferencia-GUI](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Funderneathall_pinferencia_readme_686def6f2b7f.png)\n\n![Pinferencia-REST API](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Funderneathall_pinferencia_readme_f0701f0a986f.png)\n\n如果你希望\n\n- 为你的模型添加 **GUI** 和 **REST API**\n- 寻找一种 **简单而稳健** 的方式来部署你的模型\n- 编写 **极少量** 的代码，同时保持对服务的完全控制\n- **避免** 使用任何 **重量级** 解决方案\n- 与其它工具或平台 **兼容**\n\n那么你来对地方了。\n\n## 功能特性\n\n**Pinferencia** 的主要特点包括：\n\n- **快速开发，迅速上线**。所需代码极少，转换工作量也小。直接基于你现有的内容即可。\n- **100% 测试覆盖率**：语句覆盖和分支覆盖均达到满分，绝非虚言。你是否见过有哪款模型部署工具经过如此严格的测试？\n- **易于使用，易于理解**。\n- **开箱即用的美观整洁 GUI**。\n- **自动生成 API 文档页面**。所有 API 均有详细说明，并支持在线试用功能。\n- **支持任意模型**，甚至可以部署一个单独的函数。\n- **兼容 Kserve API**，与 Kubeflow、TF Serving、Triton 和 TorchServe 等工具无缝对接。在这些工具之间切换毫无压力，而 **Pinferencia** 在原型开发阶段的速度则更为出色！\n\n## 安装\n\n### 推荐安装\n\n```bash\npip install \"pinferencia[streamlit]\"\n```\n\n### 仅安装后端\n\n```bash\npip install \"pinferencia\"\n```\n\n## 快速入门\n\n**部署任意模型**\n\n```python title=\"app.py\"\nfrom pinferencia import Server\n\n\nclass MyModel:\n    def predict(self, data):\n        return sum(data)\n\n\nmodel = MyModel()\n\nservice = Server()\nservice.register(model_name=\"mymodel\", model=model, entrypoint=\"predict\")\n```\n\n只需运行：\n\n```\npinfer app:service\n```\n\n太棒了！你的服务已经启动。访问 http:\u002F\u002F127.0.0.1:8501\u002F，尽情体验吧。\n\n**深度学习模型呢？** 同样简单。训练或加载你的模型，然后将其注册到服务中，即可立即上线。\n\n**Hugging Face**\n\n详情请见：[HuggingFace Pipeline - 视觉](https:\u002F\u002Fpinferencia.underneathall.app\u002Fml\u002Fhuggingface\u002Fpipeline\u002Fvision\u002F)\n\n```python title=\"app.py\" linenums=\"1\"\nfrom transformers import pipeline\n\nfrom pinferencia import Server\n\nvision_classifier = pipeline(task=\"image-classification\")\n\n\ndef predict(data):\n    return vision_classifier(images=data)\n\n\nservice = Server()\nservice.register(model_name=\"vision\", model=predict)\n\n```\n\n**Pytorch**\n\n```python title=\"app.py\"\nimport torch\n\nfrom pinferencia import Server\n\n\n# 训练你的模型\nmodel = \"...\"\n\n# 或者加载已有的模型 (1)\n# 从 state_dict 加载\nmodel = TheModelClass(*args, **kwargs)\nmodel.load_state_dict(torch.load(PATH))\n\n# 整体模型\nmodel = torch.load(PATH)\n\n# TorchScript\nmodel = torch.jit.load('model_scripted.pt')\n\nmodel.eval()\n\nservice = Server()\nservice.register(model_name=\"mymodel\", model=model)\n```\n\n**Tensorflow**\n\n```python title=\"app.py\"\nimport tensorflow as tf\n\nfrom pinferencia import Server\n\n\n# 训练你的模型\nmodel = \"...\"\n\n# 或者加载已有的模型 (1)\n# saved_model 格式\nmodel = tf.keras.models.load_model('saved_model\u002Fmodel')\n\n# HDF5 格式\nmodel = tf.keras.models.load_model('model.h5')\n\n# 从权重加载\nmodel = create_model()\nmodel.load_weights('.\u002Fcheckpoints\u002Fmy_checkpoint')\nloss, acc = model.evaluate(test_images, test_labels, verbose=2)\n\nservice = Server()\nservice.register(model_name=\"mymodel\", model=model, entrypoint=\"predict\")\n```\n\n无论使用何种框架的模型，部署方式都完全相同。现在运行 `uvicorn app:service --reload`，尽情享受吧！\n\n## 贡献\n\n如果你想参与贡献，详情请参阅 [这里](.\u002FCONTRIBUTING.md)。","# Pinferencia 快速上手指南\n\nPinferencia 致力于成为最简单的机器学习推理服务器。只需三行额外代码，即可让你的模型拥有漂亮的 GUI 界面和标准的 REST API，无需重型框架，快速上线。\n\n## 环境准备\n\n- **操作系统**：Linux, macOS, Windows\n- **Python 版本**：3.7 及以上\n- **前置依赖**：无特殊系统级依赖，仅需 Python 环境\n\n## 安装步骤\n\n推荐使用 `pip` 进行安装。为了获得完整的 GUI 功能（基于 Streamlit），建议安装包含 `streamlit` 的完整版本。\n\n**推荐安装（含 GUI 支持）：**\n```bash\npip install \"pinferencia[streamlit]\"\n```\n\n**仅安装后端（无 GUI）：**\n```bash\npip install \"pinferencia\"\n```\n\n> **提示**：国内用户若下载缓慢，可添加清华或阿里镜像源加速：\n> ```bash\n> pip install \"pinferencia[streamlit]\" -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> ```\n\n## 基本使用\n\n### 1. 编写服务代码\n\n创建一个名为 `app.py` 的文件。Pinferencia 的核心逻辑非常简洁：定义模型类（或函数），注册到 Server，即可启动服务。\n\n以下是一个最基础的示例，演示如何封装一个简单的预测逻辑：\n\n```python title=\"app.py\"\nfrom pinferencia import Server\n\n\nclass MyModel:\n    def predict(self, data):\n        # 这里替换为你真实的模型推理逻辑\n        return sum(data)\n\n\nmodel = MyModel()\n\nservice = Server()\n# 注册模型：指定模型名称、模型实例以及入口函数名\nservice.register(model_name=\"mymodel\", model=model, entrypoint=\"predict\")\n```\n\n**支持任意框架**：\n无论是 PyTorch、TensorFlow 还是 Hugging Face，用法一致。只需在 `predict` 方法或传入的函数中加载并调用你的模型即可。\n\n### 2. 启动服务\n\n在终端中运行以下命令启动服务：\n\n```bash\npinfer app:service\n```\n\n或者使用 uvicorn 直接运行（支持热重载）：\n\n```bash\nuvicorn app:service --reload\n```\n\n### 3. 访问服务\n\n服务启动后，默认运行在 `http:\u002F\u002F127.0.0.1:8501\u002F`。\n\n- **GUI 界面**：直接在浏览器打开上述地址，你将看到一个自动生成的漂亮界面，可直接上传数据测试模型。\n- **REST API**：访问 `http:\u002F\u002F127.0.0.1:8501\u002Fdocs` 查看自动生成的 API 文档，并支持在线调试接口。\n\n现在，你的模型已经成功上线！","某初创公司的算法工程师刚训练好一个图像分类模型，急需向产品经理演示效果并让前端团队进行接口联调。\n\n### 没有 pinferencia 时\n- **开发耗时冗长**：工程师需要花费数天时间编写 Flask 或 FastAPI 后端代码，手动配置路由、请求解析和异常处理，才能将模型包装成 API。\n- **缺乏直观界面**：产品经理无法直接体验模型效果，必须等待前端开发完成简单的测试页面后，才能进行可视化验证，沟通效率极低。\n- **文档维护困难**：每次接口变动都需要人工更新 Swagger 或 Markdown 文档，容易出现文档与代码不一致的情况，导致前端联调频繁受阻。\n- **环境依赖沉重**：为了部署一个简单的演示服务，往往需要引入沉重的容器化方案或复杂的服务器配置，资源浪费严重。\n\n### 使用 pinferencia 后\n- **极速上线**：工程师仅需定义预测函数并注册到 pinferencia，短短三行代码即可启动服务，半天内完成从模型到在线服务的转化。\n- **自带精美 GUI**：pinferencia 自动生成交互式图形界面，产品经理可直接在浏览器上传图片查看分类结果，无需任何前端开发介入。\n- **文档自动同步**：工具自动生成详细且可在线试用的 API 文档页面，前端团队可即时查看参数说明并进行调试，彻底消除沟通误差。\n- **轻量灵活部署**：无需复杂的重型架构，pinferencia 以极简的 Python 脚本运行，既支持本地快速原型验证，也能轻松兼容 Kubernetes 等生产环境。\n\npinferencia 通过“零样板代码”的特性，将模型从实验室推向应用的速度提升了数倍，让开发者专注于算法本身而非工程琐事。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Funderneathall_pinferencia_4d59c432.png","underneathall","UnderneathAll","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Funderneathall_e87168f7.png","",null,"https:\u002F\u002Fgithub.com\u002Funderneathall",[82,86,90],{"name":83,"color":84,"percentage":85},"Python","#3572A5",96.5,{"name":87,"color":88,"percentage":89},"Shell","#89e051",3.3,{"name":91,"color":92,"percentage":93},"Dockerfile","#384d54",0.2,545,82,"2026-02-10T11:11:28","Apache-2.0",1,"未说明",{"notes":101,"python":102,"dependencies":103},"该工具旨在作为轻量级推理服务器，支持多种框架（PyTorch, TensorFlow, Hugging Face 等），具体硬件需求取决于所加载的模型大小而非工具本身。安装时可选择仅后端模式或包含 Streamlit 的完整模式。兼容 KServe API，适用于快速原型开发。","3.8+",[104,105,106,107],"streamlit (可选，用于 GUI)","transformers (用于 Hugging Face 模型)","torch (用于 PyTorch 模型)","tensorflow (用于 TensorFlow 模型)",[26,51,54,14,15,13],[110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129],"ai","inference-server","predict","inference","deep-learning","modelserver","machine-learning","python","serving","model-deployment","huggingface","pytorch","tensorflow","transformers","artificial-intelligence","data-science","model-serving","computer-vision","nlp","paddlepaddle","2026-03-27T02:49:30.150509","2026-04-06T07:13:11.320353",[133,138,143,148,153,158],{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},11921,"如何修改 Pinferencia 服务的默认端口（例如 8000 被占用时）？","虽然文档中未明确说明，但可以通过指定启动模式来解决多进程冲突问题。如果默认模式（default mode）因 multiprocessing 模块在特定环境（如 CentOS）下工作不正常导致端口无法修改或服务启动失败，可以尝试使用 `frontend` 模式启动。此外，建议在标准的 Python Docker 环境（如 `python:3.10-buster`）中测试，以排除系统环境对 multiprocessing 模块的干扰。","https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fissues\u002F117",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},11922,"如何在 Pinferencia 中注册并加载多个模型？","可以通过以下两种方式为模型添加唯一标识以便注册：\n1. **Wrapper 类方式**：创建一个包含 `name` 属性和模型对象的包装类，保存为 pickle 文件。\n2. **字典方式**：直接将 `{\"name\": \"model-name\", \"model\": model_object}` 字典保存为 pickle 文件。\n\n加载时，在 `app.py` 中使用 `glob` 遍历模型目录，读取 pickle 文件，提取 name 和 model，然后循环调用 `service.register` 进行注册。示例代码逻辑如下：\n```python\nimport glob\nimport pickle\nfrom pinferencia import Server\n\nservice = Server()\nmodel_dir = \"\u002Fopt\u002Fmodels\"\nfor model_file in glob.glob(f\"{model_dir}\u002F*.pkl\"):\n    with open(model_file, \"rb\") as f:\n        data = pickle.load(f)\n        # 兼容字典或对象格式\n        name = data[\"name\"] if isinstance(data, dict) else data.name\n        model = data[\"model\"] if isinstance(data, dict) else data.model\n        service.register(name=name, model=model)\n```","https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fissues\u002F126",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},11923,"安装 Hugging Face Transformers 依赖时出现 'extra pytorch not found' 警告怎么办？","这是因为 `transformers` 库的正确 extra 依赖名称是 `torch` 而不是 `pytorch`。请修改安装命令为：\n`pip install \"transformers[torch]\"`\n该修复已应用于相关文档中，替换了错误的 `pip install \"transformers[pytorch]\"` 命令。","https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fissues\u002F120",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},11924,"Pinferencia 是否支持 gRPC 服务？","目前官方正在评估和学习 gRPC 的相关实现及框架设计，短期内不会上线该功能。未来在开发前会确保功能的可维护性、可扩展性以及充足的测试覆盖。建议暂时继续使用现有的 HTTP 服务接口。","https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fissues\u002F119",{"id":154,"question_zh":155,"answer_zh":156,"source_url":157},11925,"遇到 Streamlit 版本升级导致的 `import streamlit.bootstrap` 报错如何解决？","这是由于 Streamlit v1.12.0 及以上版本调整了代码结构，移除了 `streamlit.bootstrap` 模块。如果遇到此类导入错误，需要检查 Pinferencia 的版本兼容性，或者根据新版 Streamlit 的 API 调整内部调用逻辑（通常需等待项目方更新适配代码）。","https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fissues\u002F122",{"id":159,"question_zh":160,"answer_zh":161,"source_url":162},11926,"文档页面图片无法显示或样式错乱怎么办？","这通常是文档部署时的静态资源路径问题。如果遇到文档图片缺失或显示异常（如访问 `https:\u002F\u002Fpinferencia.underneathall.app\u002Fzh\u002F` 时），可能是临时性的部署故障或缓存问题。维护者通常会标记为“待修复”，建议稍后刷新页面或清除浏览器缓存重试。","https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fissues\u002F125",[164,169,174,179,184,189],{"id":165,"version":166,"summary_zh":167,"released_at":168},62340,"v0.2.1","## 变更内容\n* [文档] 由 @yanfeng-li 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F116 中添加了一些案例\n* 修复 transformers 的额外 [torch] 依赖，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F121 中完成\n* 发布 v0.2.1 版本，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F124 中完成\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fcompare\u002Fv0.2.0...v0.2.1","2022-08-26T16:32:54",{"id":170,"version":171,"summary_zh":172,"released_at":173},62341,"v0.2.0","## 变更内容\n* [Raadme] 修复图片未找到问题，由 @yanfeng-li 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F37 中完成\n* [文档] 解决部分错误，由 @yanfeng-li 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F39 中完成\n* 35 Streamlit 内置支持，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F41 中完成\n* [文档] 更新首页索引，由 @yanfeng-li 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F51 中完成\n* 更新 MkDocs 导航翻译，由 @yanfeng-li 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F49 中完成\n* 修复文档消失问题，由 @yanfeng-li 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F54 中完成\n* 添加 theme-flattop 主题，由 @oufl 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F40 中完成\n* Linguist 忽略 CSS、JS 和 HTML 文件，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F56 中完成\n* 增加更多端到端测试，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F52 中完成\n* 更新 index.zh.md 中的仓库链接，由 @HaveF 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F60 中完成\n* 调整文档结构，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F64 中完成\n* 更新 v0.2.0 版本文档，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F59 中完成\n* 33 支持自定义请求模型，并在 Swagger UI 中展示自定义 API，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F65 中完成\n* 使用 Mike 实现多版本文档管理，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F70 中完成\n* 修复文档中的部分错误，由 @oufl 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F72 中完成\n* 支持通过装饰器直接注册函数，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F71 中完成\n* 修复 API 文档 CSS 404 错误，由 @oufl 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F74 中完成\n* 66 文档使用 Python 3 类型提示为您的模型提供请求和响应模式，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F76 中完成\n* 前端模式：App 即后端 URL 地址，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F77 中完成\n* 文档：添加 CLI 文档，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F78 中完成\n* 更新前端需求文档，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F80 中完成\n* 工具：在 PIL 图像与 Base64 字符串之间进行转换，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F83 中完成\n* 修复静态文件缺失 bug，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F88 中完成\n* 改进端到端测试，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F89 中完成\n* 添加 API 测试，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F91 中完成\n* 69 示例 Dockerfile，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F90 中完成\n* 98 添加后端测试脚本和使用 Docker 的端到端测试脚本，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F100 中完成\n* 添加启动日志，由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F102 中完成\n* 集成 Streamlit；用于 PyPI 发布的测试脚本；","2022-07-02T07:25:49",{"id":175,"version":176,"summary_zh":177,"released_at":178},62342,"v0.1.2","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fcompare\u002Fv0.1.1...v0.1.2","2022-06-03T05:33:17",{"id":180,"version":181,"summary_zh":182,"released_at":183},62343,"v0.1.2rc2","**完整更新日志**：https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fcompare\u002Fv0.1.1...v0.1.2rc2","2022-05-30T12:17:24",{"id":185,"version":186,"summary_zh":187,"released_at":188},62344,"v0.1.1","## 变更内容\n* 由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F19 中创建了 Pull Request 模板\n* 由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F22 中添加了 Hugging Face 示例\n* 由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F24 中添加了 Hugging Face Pipeline 视觉示例\n* 由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F26 中更新了文档\n* 由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F30 中添加了中文 README 文件\n* 由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F27 中提供了 sklearn joblib、PyTorch 和 TensorFlow 的处理器\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fcompare\u002Fv0.1.0...v0.1.1","2022-05-04T15:04:42",{"id":190,"version":191,"summary_zh":192,"released_at":193},62345,"v0.1.0","特性：\n\n- 两套 API：__默认__和\n\n## 变更内容\n* 初始提交由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F1 中完成\n* 支持 Kserve API 由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F7 中完成\n* 入门文档由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F9 中完成\n* 中文文档由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F14 中完成\n* 创建 CODE_OF_CONDUCT.md 文件由 @wjiuhe 在 https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fpull\u002F13 中完成\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Funderneathall\u002Fpinferencia\u002Fcommits\u002Fv0.1.0","2022-04-14T00:27:34"]