xxx1 commited on
Commit
a3d1262
1 Parent(s): 3b1ade6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -66,7 +66,7 @@ def inference_chat(input_image,input_text):
66
  gpt3_out=gpt3(input_text,vqa,cap)
67
  gpt3_out1=gpt3(input_text,'',cap)
68
  return out[0], gpt3_out,gpt3_out1
69
-
70
  with gr.Blocks(
71
  css="""
72
  .message.svelte-w6rprc.svelte-w6rprc.svelte-w6rprc {font-size: 20px; margin-top: 20px}
@@ -75,8 +75,8 @@ with gr.Blocks(
75
  ) as iface:
76
  state = gr.State([])
77
  #caption_output = None
78
- #gr.Markdown(title)
79
- #gr.Markdown(description)
80
  #gr.Markdown(article)
81
 
82
  with gr.Row():
@@ -84,7 +84,7 @@ with gr.Blocks(
84
  image_input = gr.Image(type="pil",label="VQA Image Input")
85
  with gr.Row():
86
  with gr.Column(scale=1):
87
- chat_input = gr.Textbox(lines=1, label="VQA Quesiton Input")
88
  with gr.Row():
89
  clear_button = gr.Button(value="Clear", interactive=True)
90
  submit_button = gr.Button(
@@ -99,9 +99,10 @@ with gr.Blocks(
99
  )
100
  '''
101
  with gr.Column():
102
- caption_output_v1 = gr.Textbox(lines=0, label="CAP+LLM")
103
  caption_output = gr.Textbox(lines=0, label="VQA ")
104
- gpt3_output_v1 = gr.Textbox(lines=0, label="VQA+CAP+LLM")
 
 
105
 
106
 
107
  image_input.change(
 
66
  gpt3_out=gpt3(input_text,vqa,cap)
67
  gpt3_out1=gpt3(input_text,'',cap)
68
  return out[0], gpt3_out,gpt3_out1
69
+ title = """<h1 align="center">VQA</h1>"""
70
  with gr.Blocks(
71
  css="""
72
  .message.svelte-w6rprc.svelte-w6rprc.svelte-w6rprc {font-size: 20px; margin-top: 20px}
 
75
  ) as iface:
76
  state = gr.State([])
77
  #caption_output = None
78
+ gr.Markdown(title)
79
+ # gr.Markdown(description)
80
  #gr.Markdown(article)
81
 
82
  with gr.Row():
 
84
  image_input = gr.Image(type="pil",label="VQA Image Input")
85
  with gr.Row():
86
  with gr.Column(scale=1):
87
+ chat_input = gr.Textbox(lines=1, label="VQA Question Input")
88
  with gr.Row():
89
  clear_button = gr.Button(value="Clear", interactive=True)
90
  submit_button = gr.Button(
 
99
  )
100
  '''
101
  with gr.Column():
 
102
  caption_output = gr.Textbox(lines=0, label="VQA ")
103
+ caption_output_v1 = gr.Textbox(lines=0, label="VQA+LLM(short)")
104
+
105
+ gpt3_output_v1 = gr.Textbox(lines=0, label="VQA+LLM(long)")
106
 
107
 
108
  image_input.change(