Skip to content

FunASR-powered video transcription, subtitle generation, and LLM-assisted clipping tool with a local Gradio UI.

update LLM use

维石912437321e33
diff --git a/README.md b/README.md
index 867b99c..ddc26b2 100644
--- a/README.md
+++ b/README.md
@@ -104,6 +104,9 @@ python funclip/launch.py
<img src="docs/images/guide.jpg"/>
+使用大语言模型裁剪请参考如下教程
+<img src="docs/images/LLM_guide.png" width=360/>
+
### B.通过命令行调用使用FunClip的相关功能
```shell
# 步骤一:识别
diff --git a/README_en.md b/README_en.md
index c65af7d..206c464 100644
--- a/README_en.md
+++ b/README_en.md
@@ -99,6 +99,9 @@ python funclip/launch.py
then visit ```localhost:7860``` you will get a Gradio service like below and you can use FunClip following the steps:
<img src="docs/images/guide.jpg"/>
+Follow the guide below to explore LLM based clipping:
+<img src="docs/images/LLM_guide.png" width=360/>
+
- Step1: Upload your video file (or try the example videos below)
- Step2: Copy the text segments you need to 'Text to Clip'
- Step3: Adjust subtitle settings (if needed)
diff --git a/docs/images/LLM_guide.png b/docs/images/LLM_guide.png
new file mode 100644
index 0000000..492f93b
Binary files /dev/null and b/docs/images/LLM_guide.png differ
diff --git a/funclip/launch.py b/funclip/launch.py
index 4eff9fe..149cb50 100644
--- a/funclip/launch.py
+++ b/funclip/launch.py
@@ -159,7 +159,7 @@ if __name__ == "__main__":
with gr.Tab("🧠 LLM智能裁剪 | LLM Clipping"):
with gr.Column():
prompt_head = gr.Textbox(label="Prompt System", value=("你是一个视频srt字幕分析剪辑器,输入视频的srt字幕,"
- "分析其中的精彩且尽可能连续的片段并裁剪出来,将片段中在时间上连续的多个句子及它们的时间戳合并为一条,"
+ "分析其中的精彩且尽可能连续的片段并裁剪出来,输出四条以内的长片段,将片段中在时间上连续的多个句子及它们的时间戳合并为一条,"
"注意确保文字与时间戳的正确匹配。输出需严格按照如下格式:1. [开始时间-结束时间] 文本"))
prompt_head2 = gr.Textbox(label="Prompt User", value=("这是待裁剪的视频srt字幕:"))
with gr.Column():
@@ -174,7 +174,7 @@ if __name__ == "__main__":
label="LLM Model Name",
allow_custom_value=True)
apikey_input = gr.Textbox(label="APIKEY")
- llm_button = gr.Button("LLM智能段落选择(首先进行识别,非g4f需配置对应apikey)", variant="primary")
+ llm_button = gr.Button("LLM推理 | LLM Inference(首先进行识别,非g4f需配置对应apikey)", variant="primary")
llm_result = gr.Textbox(label="LLM Clipper Result")
with gr.Row():
llm_clip_button = gr.Button("🧠 LLM智能裁剪 | AI Clip", variant="primary")