update temp image name for browser cache bug
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def chat(image_in, in_steps, in_guidance_scale, in_img_guidance_scale, image_hid
|
|
50 |
if os.path.exists(img_name):
|
51 |
print("***Image exists and will be deleted***")
|
52 |
os.remove(img_name)
|
53 |
-
temp_img_name = img_name+str(int(time.time()))
|
54 |
print(f"temp_img_name is :{temp_img_name}")
|
55 |
# Create a file-like object
|
56 |
with open(temp_img_name, "wb") as fp:
|
|
|
50 |
if os.path.exists(img_name):
|
51 |
print("***Image exists and will be deleted***")
|
52 |
os.remove(img_name)
|
53 |
+
temp_img_name = img_name[:-4]+str(int(time.time()))+'.png' #img_name[] + str(int(time.time()))
|
54 |
print(f"temp_img_name is :{temp_img_name}")
|
55 |
# Create a file-like object
|
56 |
with open(temp_img_name, "wb") as fp:
|