ysharma HF staff commited on
Commit
6752228
·
1 Parent(s): 864f70a

update saved file name

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -5,6 +5,7 @@ import gradio as gr
5
  import random
6
  from PIL import Image
7
  import os
 
8
  from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
9
 
10
  #Loading from Diffusers Library
@@ -49,7 +50,7 @@ def chat(image_in, in_steps, in_guidance_scale, in_img_guidance_scale, image_hid
49
  if os.path.exists(img_name):
50
  print("***Image exists and will be deleted***")
51
  os.remove(img_name)
52
- temp_img_name = img_name
53
  print(f"temp_img_name is :{temp_img_name}")
54
  # Create a file-like object
55
  with open(temp_img_name, "wb") as fp:
 
5
  import random
6
  from PIL import Image
7
  import os
8
+ import time
9
  from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
10
 
11
  #Loading from Diffusers Library
 
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: