PPTAgent:一款开源免费生成和评估幻灯片的项目

发布于:2025-04-04 ⋅ 阅读:(42) ⋅ 点赞:(0)

这篇文章介绍一下PPTAgent,一个从文档自动生成演示文稿的创新系统。该系统从人类的展示创作方法中汲取灵感,采用两步流程来确保卓越的整体质量。此外,本文还介绍了PPTEval,这是一个综合评估框架,可以跨多个维度评估演示文稿。

ppt agengt

部署使用

为了快速测试,可以使用resource/test/test_(pdf|template)中的示例来节省预处理时间。

建议及要求

类别 详情
LLM推荐语言模型 语言模型:70B+非推理模型(Qwen2.5-72B-Instruct),用于生成任务。
视觉模型:7B+参数(Qwen2-VL-7B-Instruct),用于字幕任务。
系统需求 在Linux和macOS上测试,不支持Windows。
至少8GB RAM,建议使用CUDA或MPS支持以获得更好的性能。
所需依赖项:LibreOffice、poppler-utils (conda: poppler)和NodeJS。

Docker部署

使用远程服务器时,请确保80889297两个端口都被转发。

docker pull forceless/pptagent
docker run -dt --gpus all --ipc=host --name pptagent \
  -e OPENAI_API_KEY='your_key' \
  -p 9297:9297 \
  -p 8088:8088 \
  -v $HOME:/root \
  forceless/pptagent

在本地运行

安装指南

pip install git+https://github.com/icip-cas/PPTAgent.git
pip install git+https://github.com/Force1ess/python-pptx

服务端

在pptagent_ui/backend.py中初始化你的模型:

llms.language_model = LLM(
    model="Qwen2.5-72B-Instruct-GPTQ-Int4",
    api_base="http://124.16.138.143:7812/v1"
)
llms.vision = LLM(model="gpt-4o-2024-08-06")

启动前端

注意:后端API端点在src/main.js中配置为axios.defaults.baseURL

cd pptagent_ui
npm install
npm run serve

有关程序化生成的详细信息,请参阅pptagent_ui/backend.py:ppt_gen和test/test_pptgen.py。

项目结构📂

PPTAgent/
├── pptagent/
│   ├── apis.py                     # API and CodeExecutor
│   ├── llms.py                     # LLM services initialization
│   ├── presentation.py & shapes.py # Parse PowerPoint files
│   ├── induct.py                   # Presentation analysis (Stage Ⅰ)
│   ├── pptgen.py                   # Presentation generation (Stage Ⅱ)
│   ├── layout.py                   # Definition of the layout in pptxs
│   ├── document.py                 # Parse and organize markdown document
├── pptagent_ui/                    # UI for PPTAgent
|   ├── src/                        # Frontend source code
│   ├── backend.py                  # Backend server
├── roles/                          # Role definitions in PPTAgent
├── prompts/                        # Project prompts

特点✨

  • 动态内容生成:创建无缝集成文本和图像的幻灯片
  • 智能参考学习:利用现有的演示文稿,而不需要手动注释
  • 综合质量评估:通过多个质量指标评估演示文稿

案例研究💡

  • Iphone 16 Pro
    在这里插入图片描述
  • Build Effective Agents
  • 在这里插入图片描述

PTAgent🤖

PPTAgent遵循两个阶段的方法:

  • 分析阶段:从参考报告中的模式中提取和学习
  • 生成阶段:开发有结构的轮廓并制作视觉上有凝聚力的幻灯片
    我们系统的工作流程如下图所示:
    在这里插入图片描述
    github 仓库地址 :https://github.com/icip-cas/PPTAgent