bug fix after pr

This commit is contained in:
Sefik Ilkin Serengil 2022-01-08 09:41:56 +03:00
parent ba1cb93646
commit 36ef4dc3f1
2 changed files with 12 additions and 13 deletions

View File

@ -195,7 +195,7 @@ Pull requests are welcome. You should run the unit tests locally by running [`te
## Support ## Support
There are many ways to support a project - starring⭐ the GitHub repo is just one. There are many ways to support a project - starring⭐ the GitHub repo is just one 🙏.
## Citation ## Citation

View File

@ -66,16 +66,15 @@ def loadBase64Img(uri):
return img return img
def load_image(img): def load_image(img):
exact_image = False exact_image = False; base64_img = False; url_img = False
if type(img).__module__ == np.__name__: if type(img).__module__ == np.__name__:
exact_image = True exact_image = True
base64_img = False elif len(img) > 11 and img[0:11] == "data:image/":
if len(img) > 11 and img[0:11] == "data:image/":
base64_img = True base64_img = True
url_img = False elif len(img) > 11 and img.startswith("http"):
if len(img) > 11 and img.startswith("http"):
url_img = True url_img = True
#--------------------------- #---------------------------