Commit
•
9867fa1
1
Parent(s):
d8b1ce2
Update 3mergeDialogToVideo.py
Browse files- 3mergeDialogToVideo.py +2 -2
3mergeDialogToVideo.py
CHANGED
@@ -209,7 +209,6 @@ def gpt_polish(text:str)->"通过gpt润色str文案并返回str新文案,或者g
|
|
209 |
]
|
210 |
}
|
211 |
try:
|
212 |
-
|
213 |
response = requests.post('https://api.yingwu.lol/v1/chat/completions', headers=headers, data=json.dumps(data))
|
214 |
print("gpt请求的结果是",response.text)
|
215 |
print("润色后文案是:"+response.json()['choices'][0]['message']['content'])
|
@@ -288,7 +287,8 @@ if __name__ == '__main__':
|
|
288 |
if cur_copywrite is not None:
|
289 |
|
290 |
##获取当前图片对应的临时音频文件名称和文案时长
|
291 |
-
filename, duration = get_audio_data(cur_copywrite)
|
|
|
292 |
if filename is not None:
|
293 |
print("存放临时mp3文件的路径是",filename)
|
294 |
|
|
|
209 |
]
|
210 |
}
|
211 |
try:
|
|
|
212 |
response = requests.post('https://api.yingwu.lol/v1/chat/completions', headers=headers, data=json.dumps(data))
|
213 |
print("gpt请求的结果是",response.text)
|
214 |
print("润色后文案是:"+response.json()['choices'][0]['message']['content'])
|
|
|
287 |
if cur_copywrite is not None:
|
288 |
|
289 |
##获取当前图片对应的临时音频文件名称和文案时长
|
290 |
+
# filename, duration = get_audio_data(cur_copywrite)
|
291 |
+
filename, duration = get_audio_data(cur_copywrite+"\n")#两个漫画块间的文案通过\n隔开
|
292 |
if filename is not None:
|
293 |
print("存放临时mp3文件的路径是",filename)
|
294 |
|