DraconicDragon commited on
Commit
02fdf34
·
verified ·
1 Parent(s): c153ed5

Update fetch_url_util.py

Browse files
Files changed (1) hide show
  1. fetch_url_util.py +1 -3
fetch_url_util.py CHANGED
@@ -3,14 +3,13 @@ import urllib.parse
3
  from PIL import Image
4
  from curl_cffi import requests
5
 
6
- # This registers JXL support if the library is installed
7
  try:
8
  import pillow_jxl
9
  except ImportError:
10
  pass
11
 
12
  # Max file size: 150MB
13
- MAX_SIZE = 150 * 1024 * 1024
14
  MAX_SIZE_MB = MAX_SIZE / (1024 * 1024)
15
 
16
  def fetch_image_from_url(url):
@@ -34,7 +33,6 @@ def fetch_image_from_url(url):
34
 
35
  response = None
36
  try:
37
- # curl_cffi doesn't support 'with requests.get(...)', so we call it normally
38
  response = requests.get(
39
  url,
40
  headers=headers,
 
3
  from PIL import Image
4
  from curl_cffi import requests
5
 
 
6
  try:
7
  import pillow_jxl
8
  except ImportError:
9
  pass
10
 
11
  # Max file size: 150MB
12
+ MAX_SIZE = 0.1 * 1024 * 1024
13
  MAX_SIZE_MB = MAX_SIZE / (1024 * 1024)
14
 
15
  def fetch_image_from_url(url):
 
33
 
34
  response = None
35
  try:
 
36
  response = requests.get(
37
  url,
38
  headers=headers,