Update app.py
Browse files
app.py
CHANGED
@@ -3,15 +3,14 @@ import requests
|
|
3 |
import os
|
4 |
|
5 |
|
6 |
-
|
7 |
response = requests.get(download_url)
|
8 |
file_name = download_url.split("/")[-1] # Extracting the file name from the URL
|
9 |
save_path = os.path.join(os.getcwd(), file_name)
|
10 |
with open(save_path, 'wb') as f:
|
11 |
f.write(response.content)
|
12 |
-
|
13 |
-
|
14 |
-
return f"Error downloading file: {str(e)}"
|
15 |
|
16 |
def download_file(download_url):
|
17 |
try:
|
|
|
3 |
import os
|
4 |
|
5 |
|
6 |
+
|
7 |
response = requests.get(download_url)
|
8 |
file_name = download_url.split("/")[-1] # Extracting the file name from the URL
|
9 |
save_path = os.path.join(os.getcwd(), file_name)
|
10 |
with open(save_path, 'wb') as f:
|
11 |
f.write(response.content)
|
12 |
+
|
13 |
+
|
|
|
14 |
|
15 |
def download_file(download_url):
|
16 |
try:
|