ysharma HF staff commited on
Commit
f73c752
·
1 Parent(s): 7f9dcb6

update debug info

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -67,13 +67,13 @@ def chat(image_in, in_steps, in_guidance_scale, in_img_guidance_scale, image_hid
67
  #Resizing (or not) the image for better display and adding supportive sample text
68
  add_text_list = ["There you go", "Enjoy your image!", "Nice work! Wonder what you gonna do next!", "Way to go!", "Does this work for you?", "Something like this?"]
69
  if counter_out == 0:
70
- response = random.choice(add_text_list) + '<img src="/file=' + img_name + '">' # style="width: 200px; height: 200px;">'
71
  history.append((prompt, response))
72
- return history, history, edited_image, temp_img_name, counter_out
73
  else:
74
- response = random.choice(add_text_list) + '<img src="/file=' + temp_img_name + '">' # style="width: 200px; height: 200px;">'
75
  history.append((prompt, response))
76
- return history, history, edited_image, img_name, counter_out
77
 
78
  with gr.Blocks() as demo:
79
  gr.Markdown("""<h1><center> Chat Interface with InstructPix2Pix: Give Image Editing Instructions [Apologies for inconvenience, this Space is still very much a work in progress...] </h1></center>
 
67
  #Resizing (or not) the image for better display and adding supportive sample text
68
  add_text_list = ["There you go", "Enjoy your image!", "Nice work! Wonder what you gonna do next!", "Way to go!", "Does this work for you?", "Something like this?"]
69
  if counter_out == 0:
70
+ response = random.choice(add_text_list) + '<img src="/file=' + img_name + '">'
71
  history.append((prompt, response))
72
+ return history, history, edited_image, img_name, counter_out
73
  else:
74
+ response = random.choice(add_text_list) + '<img src="/file=' + temp_img_name + '">'
75
  history.append((prompt, response))
76
+ return history, history, edited_image, temp_img_name, counter_out
77
 
78
  with gr.Blocks() as demo:
79
  gr.Markdown("""<h1><center> Chat Interface with InstructPix2Pix: Give Image Editing Instructions [Apologies for inconvenience, this Space is still very much a work in progress...] </h1></center>