Spaces:
Build error
Build error
hubsnippetai
commited on
Commit
•
d4bb996
1
Parent(s):
cdac2b5
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ processor = AutoProcessor.from_pretrained("microsoft/kosmos-2-patch14-224")
|
|
15 |
async def describe_image(image_path, question : str):
|
16 |
inputs = processor(text=question, images=image_path, return_tensors="pt")
|
17 |
|
18 |
-
|
19 |
pixel_values=inputs["pixel_values"],
|
20 |
input_ids=inputs["input_ids"],
|
21 |
attention_mask=inputs["attention_mask"],
|
|
|
15 |
async def describe_image(image_path, question : str):
|
16 |
inputs = processor(text=question, images=image_path, return_tensors="pt")
|
17 |
|
18 |
+
generated_ids = await model.generate(
|
19 |
pixel_values=inputs["pixel_values"],
|
20 |
input_ids=inputs["input_ids"],
|
21 |
attention_mask=inputs["attention_mask"],
|