Spaces:
Build error
Build error
Update image2text.py
Browse files- image2text.py +2 -1
image2text.py
CHANGED
@@ -41,7 +41,8 @@ def app(model_name):
|
|
41 |
)
|
42 |
image = Image.open(image_data)
|
43 |
st.image(image)
|
44 |
-
captions = [caption.strip() for caption in captions.split(",")]
|
|
|
45 |
inputs = processor(
|
46 |
text=captions, images=image, return_tensors="jax", padding=True
|
47 |
)
|
|
|
41 |
)
|
42 |
image = Image.open(image_data)
|
43 |
st.image(image)
|
44 |
+
#captions = [caption.strip() for caption in captions.split(",")]
|
45 |
+
captions = [f'이것은 {caption.strip()}이다.' for caption in captions.split(",")]
|
46 |
inputs = processor(
|
47 |
text=captions, images=image, return_tensors="jax", padding=True
|
48 |
)
|