jpjpjpjpjp commited on
Commit
cc74800
1 Parent(s): 1d145de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,8 +6,8 @@ import json
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,7 +36,7 @@ examples =[['publaynet_example.jpeg']]
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,
 
6
  from PIL import Image
7
 
8
 
9
+ def analyze_image(image, question):
10
+
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"],
40
  outputs=gr.outputs.Textbox(type="auto", label="Answer"),
41
  title=title,
42
  description=description,