Ankur Goyal commited on
Commit
99d94a6
1 Parent(s): 6d0b7db

Fix transparency on RGBA images

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -125,7 +125,7 @@ def process_question(question, document, model=list(CHECKPOINTS.keys())[0]):
125
  return None, None
126
 
127
  predictions = run_pipeline(model, question, document, 3)
128
- pages = [x.copy() for x in document.preview]
129
  for i, p in enumerate(ensure_list(predictions)):
130
  if i > 0:
131
  # Keep the code around to produce multiple boxes, but only show the top
 
125
  return None, None
126
 
127
  predictions = run_pipeline(model, question, document, 3)
128
+ pages = [x.copy().convert("RGB") for x in document.preview]
129
  for i, p in enumerate(ensure_list(predictions)):
130
  if i > 0:
131
  # Keep the code around to produce multiple boxes, but only show the top