Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
5b27a1dc
Unverified
Commit
5b27a1dc
authored
Jan 16, 2024
by
Christopher Chou
Committed by
GitHub
Jan 16, 2024
Browse files
Rename image_url to image_file (#15)
parent
e71d4ab3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/utils.py
python/sglang/srt/utils.py
+1
-1
No files found.
python/sglang/srt/utils.py
View file @
5b27a1dc
...
...
@@ -209,7 +209,7 @@ def load_image(image_file):
elif
image_file
.
lower
().
endswith
((
"png"
,
"jpg"
,
"jpeg"
,
"webp"
,
"gif"
)):
image
=
Image
.
open
(
image_file
)
elif
image_file
.
startswith
(
"data:"
):
image_file
=
image_
url
.
split
(
","
)[
1
]
image_file
=
image_
file
.
split
(
","
)[
1
]
image
=
Image
.
open
(
BytesIO
(
base64
.
b64decode
(
image_file
)))
else
:
image
=
Image
.
open
(
BytesIO
(
base64
.
b64decode
(
image_file
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment