Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ from PIL import Image
|
|
| 5 |
from transformers import AutoProcessor, AutoModelForVision2Seq
|
| 6 |
|
| 7 |
|
| 8 |
-
model =
|
| 9 |
-
processor =
|
| 10 |
|
| 11 |
# The original Kosmos-2 demo saves the image first then reload it. For some images, this will give slightly different image input and change the generation outputs.
|
| 12 |
|
|
|
|
| 5 |
from transformers import AutoProcessor, AutoModelForVision2Seq
|
| 6 |
|
| 7 |
|
| 8 |
+
model = AutoModelForVision2Seq.from_pretrained("microsoft/kosmos-2-patch14-224")
|
| 9 |
+
processor = AutoProcessor.from_pretrained("microsoft/kosmos-2-patch14-224")
|
| 10 |
|
| 11 |
# The original Kosmos-2 demo saves the image first then reload it. For some images, this will give slightly different image input and change the generation outputs.
|
| 12 |
|