Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,9 +24,7 @@ def generate_caption(image):
|
|
| 24 |
"Describe this image in one concise, natural sentence.",
|
| 25 |
image
|
| 26 |
])
|
| 27 |
-
|
| 28 |
return response.text.strip()
|
| 29 |
-
|
| 30 |
except Exception as e:
|
| 31 |
return f"Error: {str(e)}"
|
| 32 |
|
|
@@ -39,5 +37,6 @@ interface = gr.Interface(
|
|
| 39 |
description="Upload an image to get a caption generated"
|
| 40 |
)
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
| 24 |
"Describe this image in one concise, natural sentence.",
|
| 25 |
image
|
| 26 |
])
|
|
|
|
| 27 |
return response.text.strip()
|
|
|
|
| 28 |
except Exception as e:
|
| 29 |
return f"Error: {str(e)}"
|
| 30 |
|
|
|
|
| 37 |
description="Upload an image to get a caption generated"
|
| 38 |
)
|
| 39 |
|
| 40 |
+
# Corrected this line
|
| 41 |
+
if __name__ == "__main__":
|
| 42 |
+
interface.launch()
|