Spaces:
Runtime error
Runtime error
fix: coverting RGB
Browse files
app.py
CHANGED
@@ -74,14 +74,15 @@ image_choice_map = {
|
|
74 |
'2': 'commoncrawl_canyonhillschroniclecomtagwomens-basketbll_0.png',
|
75 |
'3': 'commoncrawl_celstuttgartdeideaa-different-stort-of-nfe_0.png'
|
76 |
}
|
77 |
-
image = Image.open(image_choice_map[image_choice])
|
78 |
-
image.save('./target_image.jpg')
|
79 |
-
image = Image.open('./target_image.jpg')
|
80 |
|
81 |
with col1:
|
82 |
st.image(image, caption='Your target sample')
|
83 |
|
84 |
if st.button('Parse sample! π'):
|
|
|
|
|
|
|
|
|
85 |
with st.spinner(f'baking the π©s...'):
|
86 |
if information == 'Base Common-Crawl π©':
|
87 |
processor = DonutProcessor.from_pretrained("laverdes/donut-commoncrawl")
|
|
|
74 |
'2': 'commoncrawl_canyonhillschroniclecomtagwomens-basketbll_0.png',
|
75 |
'3': 'commoncrawl_celstuttgartdeideaa-different-stort-of-nfe_0.png'
|
76 |
}
|
|
|
|
|
|
|
77 |
|
78 |
with col1:
|
79 |
st.image(image, caption='Your target sample')
|
80 |
|
81 |
if st.button('Parse sample! π'):
|
82 |
+
image = Image.open(image_choice_map[image_choice])
|
83 |
+
image = image.convert('RGB')
|
84 |
+
image.save('./target_image.jpg')
|
85 |
+
image = Image.open('./target_image.jpg')
|
86 |
with st.spinner(f'baking the π©s...'):
|
87 |
if information == 'Base Common-Crawl π©':
|
88 |
processor = DonutProcessor.from_pretrained("laverdes/donut-commoncrawl")
|