xelpmocAI commited on
Commit
9510f36
·
verified ·
1 Parent(s): 25d42ca

TypeError: gradio.components.image.ImageData() argument after ** must be a mapping, not numpy.ndarray handled

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -93,6 +93,8 @@ def demo(image_name, prompt):
93
  return json
94
 
95
  def process_document(image):
 
 
96
  one = demo(image, other_benifits)
97
  two = demo(image, tax_deductions)
98
  json_op = {
 
93
  return json
94
 
95
  def process_document(image):
96
+ if isinstance(image, np.ndarray):
97
+ image = Image.fromarray(image)
98
  one = demo(image, other_benifits)
99
  two = demo(image, tax_deductions)
100
  json_op = {