Spaces:
Running
Running
Update image.py
Browse files
image.py
CHANGED
@@ -95,5 +95,6 @@ def fetch_image(title, summary, api_key):
|
|
95 |
print(f"Error fetching image: {e}")
|
96 |
image_url = "https://i.ibb.co/TBJqggw/Image-Not-Found.jpg"
|
97 |
finally:
|
98 |
-
os.
|
|
|
99 |
return image_url
|
|
|
95 |
print(f"Error fetching image: {e}")
|
96 |
image_url = "https://i.ibb.co/TBJqggw/Image-Not-Found.jpg"
|
97 |
finally:
|
98 |
+
if os.path.exists("image.png"):
|
99 |
+
os.remove("image.png")
|
100 |
return image_url
|