Spaces:
Paused
Paused
tomato
commited on
Commit
·
d48a51a
1
Parent(s):
152a7cc
unknow error [warning_once] from [Logger]
Browse files
app.py
CHANGED
@@ -10,10 +10,7 @@ model = AutoModel.from_pretrained(MODEL_NAME, trust_remote_code=True)
|
|
10 |
def summarize(transcript, sentence_count):
|
11 |
history = []
|
12 |
|
13 |
-
prompt = f"""
|
14 |
-
视频脚本:{transcript}
|
15 |
-
我希望你作为一名专业的视频内容编辑,帮我用中文总结视频脚本的内容精华。请先用一句简短的话总结视频梗概。然后再请你将视频字幕文本进行总结(字幕中可能有错别字,如果你发现了错别字请改正)。请你以无序列表的方式返回,请注意不要超过{sentence_count}条哦,确保所有的句子都足够精简,清晰完整,祝你好运!
|
16 |
-
"""
|
17 |
|
18 |
response, history = model.chat(tokenizer, prompt, history=history)
|
19 |
|
@@ -31,7 +28,6 @@ demo = gr.Interface(fn = summarize,
|
|
31 |
outputs = [gr.Textbox(lines=10,
|
32 |
label="Summary")],
|
33 |
|
34 |
-
title = "🎈 Summarizer 🎈"
|
35 |
-
enable_queue=True)
|
36 |
|
37 |
demo.launch()
|
|
|
10 |
def summarize(transcript, sentence_count):
|
11 |
history = []
|
12 |
|
13 |
+
prompt = f"""视频脚本:{transcript}。我希望你作为一名专业的视频内容编辑,帮我用中文总结视频脚本的内容精华。请先用一句简短的话总结视频梗概。然后再请你将视频字幕文本进行总结(字幕中可能有错别字,如果你发现了错别字请改正)。请你以无序列表的方式返回,请注意不要超过{sentence_count}条哦,确保所有的句子都足够精简,清晰完整,祝你好运!"""
|
|
|
|
|
|
|
14 |
|
15 |
response, history = model.chat(tokenizer, prompt, history=history)
|
16 |
|
|
|
28 |
outputs = [gr.Textbox(lines=10,
|
29 |
label="Summary")],
|
30 |
|
31 |
+
title = "🎈 Summarizer 🎈")
|
|
|
32 |
|
33 |
demo.launch()
|