Spaces:
Sleeping
Sleeping
Update run.py
Browse files
run.py
CHANGED
@@ -41,7 +41,7 @@ def fast_caption(sys_prompt, usr_prompt, temp, top_p, max_tokens, model, key, en
|
|
41 |
print("video_path")
|
42 |
video_path_url = video_path_url["id"]
|
43 |
# 使用requests下载文件到临时文件
|
44 |
-
response = requests.get(
|
45 |
if response.status_code == 200:
|
46 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".mp4") as temp_video_file:
|
47 |
temp_video_file.write(response.content)
|
|
|
41 |
print("video_path")
|
42 |
video_path_url = video_path_url["id"]
|
43 |
# 使用requests下载文件到临时文件
|
44 |
+
response = requests.get(video_path_url, stream=True)
|
45 |
if response.status_code == 200:
|
46 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".mp4") as temp_video_file:
|
47 |
temp_video_file.write(response.content)
|