ysharma HF staff commited on
Commit
abf9f32
·
1 Parent(s): 176f241

updates to desc

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -38,7 +38,8 @@ be to the input. This pipeline requires a value of at least `1`. It's possible y
38
  * Cropping the image so the face takes up a larger portion of the frame.
39
  """
40
 
41
- def chat(image_in, in_steps, in_guidance_scale, in_img_guidance_scale, image_hid, img_name, counter_out, prompt, history): #, progress=gr.Progress(track_tqdm=True)):
 
42
  #if message == "revert": --to add revert functionality later
43
  print(f"counter:{counter_out}, prompt:{prompt}, img_name:{img_name}")
44
  if counter_out > 0:
@@ -49,6 +50,7 @@ def chat(image_in, in_steps, in_guidance_scale, in_img_guidance_scale, image_hid
49
  os.remove(img_name)
50
  edited_image.save(img_name) #, overwrite=True)
51
  else:
 
52
  seed = random.randint(0, 1000000)
53
  img_name = f"./edited_image_{seed}.png"
54
  edited_image = pipe(prompt, image=image_in, num_inference_steps=int(in_steps), guidance_scale=float(in_guidance_scale), image_guidance_scale=float(in_img_guidance_scale)).images[0]
 
38
  * Cropping the image so the face takes up a larger portion of the frame.
39
  """
40
 
41
+ def chat(image_in, in_steps, in_guidance_scale, in_img_guidance_scale, image_hid, img_name, counter_out, prompt, history, progress=gr.Progress(track_tqdm=True)):
42
+ progress(0, desc="Starting...")
43
  #if message == "revert": --to add revert functionality later
44
  print(f"counter:{counter_out}, prompt:{prompt}, img_name:{img_name}")
45
  if counter_out > 0:
 
50
  os.remove(img_name)
51
  edited_image.save(img_name) #, overwrite=True)
52
  else:
53
+ print("FIRST PASS")
54
  seed = random.randint(0, 1000000)
55
  img_name = f"./edited_image_{seed}.png"
56
  edited_image = pipe(prompt, image=image_in, num_inference_steps=int(in_steps), guidance_scale=float(in_guidance_scale), image_guidance_scale=float(in_img_guidance_scale)).images[0]