AYYasaswini commited on
Commit
74a27e1
·
verified ·
1 Parent(s): 131502a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -192,14 +192,14 @@ def latents_to_pil(latents):
192
  #!curl --output macaw.jpg 'https://lafeber.com/pet-birds/wp-content/uploads/2018/06/Scarlet-Macaw-2.jpg'
193
  url = 'https://lafeber.com/pet-birds/wp-content/uploads/2018/06/Scarlet-Macaw-2.jpg'
194
 
195
- try:
196
- response = requests.get(url)
197
- response.raise_for_status() # Raise an exception for HTTP errors
198
- with open('macaw.jpg', 'wb') as file:
199
- file.write(response.content)
200
- print("Image downloaded successfully")
201
- except requests.exceptions.RequestException as e:
202
- print(f"Failed to download image: {e}")
203
 
204
  # Call the function if this is the main module
205
 
 
192
  #!curl --output macaw.jpg 'https://lafeber.com/pet-birds/wp-content/uploads/2018/06/Scarlet-Macaw-2.jpg'
193
  url = 'https://lafeber.com/pet-birds/wp-content/uploads/2018/06/Scarlet-Macaw-2.jpg'
194
 
195
+ try:
196
+ response = requests.get(url)
197
+ response.raise_for_status() # Raise an exception for HTTP errors
198
+ with open('macaw.jpg', 'wb') as file:
199
+ file.write(response.content)
200
+ print("Image downloaded successfully")
201
+ except requests.exceptions.RequestException as e:
202
+ print(f"Failed to download image: {e}")
203
 
204
  # Call the function if this is the main module
205