liyaoshi commited on
Commit
2afd24b
·
verified ·
1 Parent(s): 520f0d4

chage the order of text and image components

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ import os
14
 
15
  openai_api_key = os.environ.get('openai_api_key')
16
 
17
- def ask_image(image,text,api_token=openai_api_key):
18
  base64_image = encode_image(image)
19
  messages=[
20
  {
@@ -79,7 +79,7 @@ description = "Ask anything about your Image"
79
 
80
  demo = gr.Interface(
81
  fn=ask_image,
82
- inputs=[gr.Image(label='',type='filepath'), gr.Text(label="Question")],
83
  outputs=[gr.Textbox(label="Answer",lines=3)],
84
  title = title,
85
  description = description
 
14
 
15
  openai_api_key = os.environ.get('openai_api_key')
16
 
17
+ def ask_image(text,image,api_token=openai_api_key):
18
  base64_image = encode_image(image)
19
  messages=[
20
  {
 
79
 
80
  demo = gr.Interface(
81
  fn=ask_image,
82
+ inputs=[gr.Text(label="Question"),gr.Image(label='',type='filepath')],
83
  outputs=[gr.Textbox(label="Answer",lines=3)],
84
  title = title,
85
  description = description