[fxi]PNG image failed to parse after uploading
[TAPD] ID: 1004154
This commit is contained in:
@@ -51,7 +51,7 @@ def chunk(filename, binary, lang, callback=None, vision_model=None, **kwargs):
|
|||||||
img_binary = io.BytesIO()
|
img_binary = io.BytesIO()
|
||||||
img.save(img_binary, format="JPEG")
|
img.save(img_binary, format="JPEG")
|
||||||
img_binary.seek(0)
|
img_binary.seek(0)
|
||||||
ans = vision_model.describe(img_binary.read())
|
ans, ans_num_tokens = vision_model.describe(img_binary.read())
|
||||||
callback(0.8, "CV LLM respond: %s ..." % ans[:32])
|
callback(0.8, "CV LLM respond: %s ..." % ans[:32])
|
||||||
txt += "\n" + ans
|
txt += "\n" + ans
|
||||||
tokenize(doc, txt, eng)
|
tokenize(doc, txt, eng)
|
||||||
|
|||||||
Reference in New Issue
Block a user