Skip to content

Commit 9c3ec29

Browse files
committed
deploy to hf
1 parent e07aa64 commit 9c3ec29

4 files changed

Lines changed: 61 additions & 3 deletions

File tree

.github/workflows/deploy-to-hf.yml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,61 @@ jobs:
3939
cp requirements.txt /tmp/hf-deploy/
4040
cp -r src /tmp/hf-deploy/
4141
42-
cp README.md /tmp/hf-deploy/ || echo "README.md not found, skipping"
43-
4442
cp LICENSE /tmp/hf-deploy/ || echo "LICENSE not found, skipping"
4543
44+
# 创建带有 HF Space 配置的 README.md
45+
cat > /tmp/hf-deploy/README.md << 'EOF'
46+
---
47+
title: Auto Chapter Bar
48+
emoji: 🎬
49+
colorFrom: blue
50+
colorTo: purple
51+
sdk: gradio
52+
sdk_version: "5.9.1"
53+
app_file: app.py
54+
pinned: false
55+
license: apache-2.0
56+
---
57+
58+
# 🎬 Auto Chapter Bar
59+
60+
Auto Chapter Bar(简称 `acb`)是一个开源的 Python 工具,可以快速将 SRT 字幕文件转换为带有 Alpha 透明通道的视频章节进度条。
61+
62+
## ✨ 核心特性
63+
64+
- **🎨 透明通道支持**:输出 RGBA 格式,可完美叠加在任意视频上
65+
- **🤖 AI 智能分段**:基于 Moonshot LLM 理解语义边界,自动识别章节
66+
- **🔒 隐私优先**:完全本地处理,视频文件不上传云端
67+
- **⚡ 高性能**:多进程并行处理,速度提升 2-4 倍
68+
- **🎛️ 三种模式**:AI 智能模式、自动分段模式、手动配置模式
69+
70+
## 🚀 使用方法
71+
72+
1. 上传 SRT 字幕文件
73+
2. 输入视频总时长(秒)
74+
3. 选择生成模式(AI 或 Auto)
75+
4. 点击生成按钮
76+
5. 下载生成的章节进度条视频
77+
78+
## 📦 在视频编辑软件中使用
79+
80+
生成的视频带有透明通道(Alpha Channel),可以直接叠加在原视频上:
81+
82+
- **Adobe Premiere Pro**:导入后放在最上层视频轨道
83+
- **剪映(CapCut)**:添加为画中画轨道
84+
- **DaVinci Resolve**:放在视频轨道最上层
85+
86+
## 🔗 项目链接
87+
88+
- **GitHub**: https://github.com/bbruceyuan/auto-chapter-bar
89+
- **文档**: 查看 GitHub 仓库获取完整文档
90+
- **许可证**: Apache License 2.0
91+
92+
---
93+
94+
⭐ 如果觉得这个项目有帮助,请在 GitHub 给个 Star!
95+
EOF
96+
4697
# 创建 .gitignore for HF Space
4798
cat > /tmp/hf-deploy/.gitignore << 'EOF'
4899
__pycache__/

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ CLAUDE.md
88
# 输出文件
99
outputs/
1010
inputs/
11-
docs/
1211

1312
# 生成的视频文件
1413
*.mov

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
<div align="center">
2+
13
# 🎬 Auto Chapter Bar
24

35
[![Hugging Face Space](https://img.shields.io/badge/🤗%20Hugging%20Face-Space-blue)](https://huggingface.co/spaces/bbruceyuan/auto-chapter-bar)
46
[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)
57
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
68
[![GitHub stars](https://img.shields.io/github/stars/bbruceyuan/auto-chapter-bar?style=social)](https://github.com/bbruceyuan/auto-chapter-bar/stargazers)
79

10+
</div>
11+
812
Auto Chapter Bar(简称 `acb`)是一个开源的 Python 工具,可以快速将 SRT 字幕文件转换为带有 Alpha 透明通道的视频章节进度条。它特别适用于提升长视频的观看体验和完播率。
913

1014
**直接在终端使用:** `acb input.srt 360``chapterbar input.srt 360`
@@ -378,8 +382,12 @@ Apache License 2.0 - 详见 [LICENSE](LICENSE) 文件
378382

379383
---
380384

385+
<div align="center">
386+
381387
# 🎬 Auto Chapter Bar (English)
382388

389+
</div>
390+
383391
Auto Chapter Bar (or `acb` in CLI) is an open-source Python tool that converts SRT subtitle files into transparent video chapter progress bars with alpha channel. Perfect for improving watch time and completion rates of long-form videos.
384392

385393
**Use directly in terminal:** `acb input.srt 360` or `chapterbar input.srt 360`
File renamed without changes.

0 commit comments

Comments
 (0)