jpjpjpjpjp commited on
Commit
1d145de
1 Parent(s): 53e95b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,7 +6,8 @@ import json
6
  from PIL import Image
7
 
8
 
9
- def analyze_image(image, question):
 
10
  #img64 = base64.b64decode(image)
11
  im = Image.fromarray(image)
12
  in_mem_file = io.BytesIO()
@@ -35,7 +36,7 @@ examples =[['publaynet_example.jpeg']]
35
  css = ".output-image, .input-image, .image-preview {height: 600px !important}"
36
 
37
  demo = gr.Interface(fn=analyze_image,
38
- inputs=[gr.inputs.Image(type="numpy", label="Document image"),"text"],
39
  outputs=gr.outputs.Textbox(type="auto", label="Answer"),
40
  title=title,
41
  description=description,
 
6
  from PIL import Image
7
 
8
 
9
+ def analyze_image(image, question, key):
10
+ print(key)
11
  #img64 = base64.b64decode(image)
12
  im = Image.fromarray(image)
13
  in_mem_file = io.BytesIO()
 
36
  css = ".output-image, .input-image, .image-preview {height: 600px !important}"
37
 
38
  demo = gr.Interface(fn=analyze_image,
39
+ inputs=[gr.inputs.Image(type="numpy", label="Document image"),"text","text"],
40
  outputs=gr.outputs.Textbox(type="auto", label="Answer"),
41
  title=title,
42
  description=description,