laverdes commited on
Commit
89556d3
β€’
1 Parent(s): bc079c2

fix: coverting RGB

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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")