tlodato commited on
Commit
203f4a0
·
1 Parent(s): d20cc99
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,9 +11,9 @@ def vqa(image_path:str, prompt:str):
11
  result = client.predict(image_path,prompt,fn_index=3)
12
  return result
13
 
14
- def variants(image_path:str,prompt:str,rot:int):
15
  with tempfile.NamedTemporaryFile(mode="wb") as img:
16
- img = Image.open(image_path,mode="r").rotate(rot).save("temp.jpg")
17
  vqa(img,prompt)
18
 
19
 
@@ -34,7 +34,7 @@ with gr.Blocks(css=css) as demo:
34
  vqa_btn = gr.Button("Answer Visual Question")
35
  vqa_btn.click(
36
  fn=variants,
37
- inputs = [image_input,text_input,90],
38
  outputs = vqa_output
39
  )
40
 
 
11
  result = client.predict(image_path,prompt,fn_index=3)
12
  return result
13
 
14
+ def variants(image_path:str,prompt:str):
15
  with tempfile.NamedTemporaryFile(mode="wb") as img:
16
+ img = Image.open(image_path,mode="r").rotate(90).save("temp.jpg")
17
  vqa(img,prompt)
18
 
19
 
 
34
  vqa_btn = gr.Button("Answer Visual Question")
35
  vqa_btn.click(
36
  fn=variants,
37
+ inputs = [image_input,text_input],
38
  outputs = vqa_output
39
  )
40