awacke1 commited on
Commit
5187dd9
1 Parent(s): c1a9c17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -200,9 +200,11 @@ def predict(prompt, guidance, steps, seed=1231231):
200
  image_path = os.path.join("", filename) # Specify your directory
201
  results.images[0].save(image_path)
202
  print(f"#Image saved as {image_path}")
203
- encoded_image = encode_image(image)
204
- html_link = f'<a href="data:image/png;base64,{encoded_image}" download="{filename}">Download Image</a>'
205
- gr.HTML(html_link)
 
 
206
  except:
207
  return results.images[0]
208
 
 
200
  image_path = os.path.join("", filename) # Specify your directory
201
  results.images[0].save(image_path)
202
  print(f"#Image saved as {image_path}")
203
+ gr.File(image_path)
204
+ gr.Button(link=image_path)
205
+ # encoded_image = encode_image(image)
206
+ # html_link = f'<a href="data:image/png;base64,{encoded_image}" download="{filename}">Download Image</a>'
207
+ # gr.HTML(html_link)
208
  except:
209
  return results.images[0]
210