Spaces:
Sleeping
Sleeping
Update other_function.py
Browse files- other_function.py +2 -2
other_function.py
CHANGED
|
@@ -81,11 +81,11 @@ def predict_disease(filepath):
|
|
| 81 |
def convert_img(url, account_sid, auth_token):
|
| 82 |
if 1==1:
|
| 83 |
# Make the request to the media URL with authentication
|
| 84 |
-
response = requests.get(url, auth=HTTPBasicAuth(account_sid, auth_token))
|
| 85 |
response.raise_for_status() # Raise an error for bad responses
|
| 86 |
|
| 87 |
# Determine a filename from the URL
|
| 88 |
-
parsed_url = urlparse(url)
|
| 89 |
media_id = parsed_url.path.split('/')[-1] # Get the last part of the URL path
|
| 90 |
filename = f"image.jpg"
|
| 91 |
|
|
|
|
| 81 |
def convert_img(url, account_sid, auth_token):
|
| 82 |
if 1==1:
|
| 83 |
# Make the request to the media URL with authentication
|
| 84 |
+
response = requests.get(url.replace(' ',''), auth=HTTPBasicAuth(account_sid, auth_token))
|
| 85 |
response.raise_for_status() # Raise an error for bad responses
|
| 86 |
|
| 87 |
# Determine a filename from the URL
|
| 88 |
+
parsed_url = urlparse(url.replace(' ',''))
|
| 89 |
media_id = parsed_url.path.split('/')[-1] # Get the last part of the URL path
|
| 90 |
filename = f"image.jpg"
|
| 91 |
|