Spaces:
Sleeping
Sleeping
thuonguyenvan commited on
Commit ·
11522ca
1
Parent(s): 037e196
Increase URL download timeout to 30s
Browse files
app.py
CHANGED
|
@@ -295,8 +295,8 @@ async def predict_url(image_url: ImageURL):
|
|
| 295 |
Top 5 predictions with class names and confidence scores
|
| 296 |
"""
|
| 297 |
try:
|
| 298 |
-
# Download image from URL
|
| 299 |
-
response = requests.get(str(image_url.url), timeout=
|
| 300 |
response.raise_for_status()
|
| 301 |
|
| 302 |
# Open image
|
|
|
|
| 295 |
Top 5 predictions with class names and confidence scores
|
| 296 |
"""
|
| 297 |
try:
|
| 298 |
+
# Download image from URL with longer timeout for large images
|
| 299 |
+
response = requests.get(str(image_url.url), timeout=30)
|
| 300 |
response.raise_for_status()
|
| 301 |
|
| 302 |
# Open image
|