Spaces:
Running
Running
init commit
Browse files
app.py
CHANGED
|
@@ -237,8 +237,8 @@ def _launch_demo(args, model, processor):
|
|
| 237 |
# 下载图片
|
| 238 |
response = requests.get(url, timeout=10)
|
| 239 |
response.raise_for_status()
|
| 240 |
-
|
| 241 |
-
|
| 242 |
return temp_path
|
| 243 |
except Exception as e:
|
| 244 |
print(f"下载图片失败: {url}, 错误: {e}")
|
|
|
|
| 237 |
# 下载图片
|
| 238 |
response = requests.get(url, timeout=10)
|
| 239 |
response.raise_for_status()
|
| 240 |
+
with open(temp_path, 'wb') as f:
|
| 241 |
+
f.write(response.content)
|
| 242 |
return temp_path
|
| 243 |
except Exception as e:
|
| 244 |
print(f"下载图片失败: {url}, 错误: {e}")
|