MackinationsAi commited on
Commit
c89a48d
·
verified ·
1 Parent(s): a5205b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -72,7 +72,7 @@ def main():
72
 
73
  if st.button(':blue[Generate Image]', use_container_width=True):
74
  with st.spinner('Generating Image...'):
75
- result = generate_image(api_key, prompt, aspect_ratios, mode, models, seed, output_formats, strength, negative_prompt, uploaded_file, download)
76
  if result.status_code == 200:
77
  image = Image.open(io.BytesIO(result.content))
78
  st.image(image, use_column_width=True)
@@ -82,7 +82,7 @@ def main():
82
  st.success(f'Image saved to {file_path}')
83
  # Download generated image for Huggingface Spaces add-on
84
  with open(file_path, "rb") as file:
85
- download = st.download_button(label=":green[Download Image]", data=file, file_name=file_path, mime=f"image/{output_formats}", use_container_width=True)
86
  else:
87
  st.error('Failed to generate image: ' + str(result.json()))
88
 
 
72
 
73
  if st.button(':blue[Generate Image]', use_container_width=True):
74
  with st.spinner('Generating Image...'):
75
+ result = generate_image(api_key, prompt, aspect_ratios, mode, models, seed, output_formats, strength, negative_prompt, uploaded_file)
76
  if result.status_code == 200:
77
  image = Image.open(io.BytesIO(result.content))
78
  st.image(image, use_column_width=True)
 
82
  st.success(f'Image saved to {file_path}')
83
  # Download generated image for Huggingface Spaces add-on
84
  with open(file_path, "rb") as file:
85
+ st.download_button(label=":green[Download Image]", data=file, file_name=file_path, mime=f"image/{output_formats}", use_container_width=True)
86
  else:
87
  st.error('Failed to generate image: ' + str(result.json()))
88