Spaces:
Runtime error
Runtime error
Commit ·
b9083a9
1
Parent(s): 906f9ca
Upload folder using huggingface_hub
Browse files
image_caption/get_caption.py
CHANGED
|
@@ -59,7 +59,9 @@ def get_image_caption(img_obj, prompt=None):
|
|
| 59 |
print(f"Caption = {caption}")
|
| 60 |
return caption
|
| 61 |
elif response.status_code == 502:
|
| 62 |
-
print("
|
|
|
|
|
|
|
| 63 |
else:
|
| 64 |
return "Error in generating the caption!"
|
| 65 |
|
|
|
|
| 59 |
print(f"Caption = {caption}")
|
| 60 |
return caption
|
| 61 |
elif response.status_code == 502:
|
| 62 |
+
print("Status 502")
|
| 63 |
+
return "Model is getting loaded, please wait for 3-4 minutes and then try again."
|
| 64 |
+
|
| 65 |
else:
|
| 66 |
return "Error in generating the caption!"
|
| 67 |
|