MaziyarPanahi commited on
Commit
3cd3cf3
1 Parent(s): b20560a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,7 +42,7 @@ def run_example(image, text_input=None, model_id="Qwen/Qwen2-VL-2B-Instruct"):
42
  "content": [
43
  {
44
  "type": "image",
45
- "image": f"<|image_1|>",
46
  },
47
  {"type": "text", "text": text_input},
48
  ],
@@ -87,7 +87,7 @@ with gr.Blocks(css=css) as demo:
87
  with gr.Tab(label="Qwen2-VL-2B Input"):
88
  with gr.Row():
89
  with gr.Column():
90
- input_img = gr.Image(label="Input Picture")
91
  model_selector = gr.Dropdown(choices=list(models.keys()), label="Model", value="Qwen/Qwen2-VL-2B-Instruct")
92
  text_input = gr.Textbox(label="Question")
93
  submit_btn = gr.Button(value="Submit")
 
42
  "content": [
43
  {
44
  "type": "image",
45
+ "image": image,
46
  },
47
  {"type": "text", "text": text_input},
48
  ],
 
87
  with gr.Tab(label="Qwen2-VL-2B Input"):
88
  with gr.Row():
89
  with gr.Column():
90
+ input_img = gr.Image(label="Input Picture", type="filepath")
91
  model_selector = gr.Dropdown(choices=list(models.keys()), label="Model", value="Qwen/Qwen2-VL-2B-Instruct")
92
  text_input = gr.Textbox(label="Question")
93
  submit_btn = gr.Button(value="Submit")