rphrp1985 commited on
Commit
deacbef
1 Parent(s): a7583a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -37,9 +37,9 @@ def url_to_base64(image_url):
37
  if response.status_code == 200:
38
  # Encode image content to Base64
39
  base64_image = base64.b64encode(response.content).decode('utf-8')
40
- return base64_image
41
  else:
42
- return ''
43
 
44
  import json
45
 
 
37
  if response.status_code == 200:
38
  # Encode image content to Base64
39
  base64_image = base64.b64encode(response.content).decode('utf-8')
40
+ return f"data:image/jpeg;base64,{base64_image}"
41
  else:
42
+ return f"data:image/jpeg;base64,"
43
 
44
  import json
45