MingGatsby commited on
Commit
849f759
·
verified ·
1 Parent(s): c0c1d9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -67,12 +67,12 @@ def summarize_video(file_path):
67
  messages=[
68
  {
69
  "role": "system",
70
- "content": """你是一位優秀的摘要撰寫者。請根據提供的影片及其文字轉錄內容撰寫一份 Markdown 格式的摘要,並以列點式的形式呈現。""",
71
  },
72
  {
73
  "role": "user",
74
  "content": [
75
- "以下是從影片中獲取的幀圖片",
76
  *map(
77
  lambda x: {
78
  "type": "image_url",
@@ -85,7 +85,7 @@ def summarize_video(file_path):
85
  ),
86
  {
87
  "type": "text",
88
- "text": f"影片的文字轉錄如下: {transcription.text}",
89
  },
90
  ],
91
  },
@@ -102,7 +102,7 @@ demo = gr.Interface(
102
  inputs=[gr.File(label="上傳影片 (mp4)")],
103
  outputs="markdown",
104
  title="影片摘要生成器",
105
- description="上傳影片並將會生成列點式摘要。",
106
  )
107
 
108
  if __name__ == "__main__":
 
67
  messages=[
68
  {
69
  "role": "system",
70
+ "content": """你是一位優秀的摘要撰寫者。請根據提供的影片及其文字轉錄內容撰寫一份 Markdown 格式的摘要。""",
71
  },
72
  {
73
  "role": "user",
74
  "content": [
75
+ "這些是從影片中獲取的幀圖片",
76
  *map(
77
  lambda x: {
78
  "type": "image_url",
 
85
  ),
86
  {
87
  "type": "text",
88
+ "text": f"這是影片的文字轉錄內容: {transcription.text}",
89
  },
90
  ],
91
  },
 
102
  inputs=[gr.File(label="上傳影片 (mp4)")],
103
  outputs="markdown",
104
  title="影片摘要生成器",
105
+ description="上傳影片並將會生成摘要。",
106
  )
107
 
108
  if __name__ == "__main__":