Spaces:
Running
on
Zero
Running
on
Zero
GanymedeNil
commited on
Commit
•
3d8d74a
1
Parent(s):
d0c2593
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ import os
|
|
13 |
# subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
14 |
|
15 |
# models = {
|
16 |
-
# "Qwen/Qwen2-VL-
|
17 |
|
18 |
# }
|
19 |
def array_to_image_path(image_array):
|
@@ -112,7 +112,7 @@ with gr.Blocks(css=css) as demo:
|
|
112 |
with gr.Row():
|
113 |
with gr.Column():
|
114 |
input_img = gr.Image(label="Input Picture")
|
115 |
-
model_selector = gr.Dropdown(choices=list(models.keys()), label="Model", value="Qwen/Qwen2-VL-
|
116 |
text_input = gr.Textbox(label="Question")
|
117 |
submit_btn = gr.Button(value="Submit")
|
118 |
with gr.Column():
|
|
|
13 |
# subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
14 |
|
15 |
# models = {
|
16 |
+
# "Qwen/Qwen2-VL-7B-Instruct": AutoModelForCausalLM.from_pretrained("Qwen/Qwen2-VL-7B-Instruct", trust_remote_code=True, torch_dtype="auto", _attn_implementation="flash_attention_2").cuda().eval()
|
17 |
|
18 |
# }
|
19 |
def array_to_image_path(image_array):
|
|
|
112 |
with gr.Row():
|
113 |
with gr.Column():
|
114 |
input_img = gr.Image(label="Input Picture")
|
115 |
+
model_selector = gr.Dropdown(choices=list(models.keys()), label="Model", value="Qwen/Qwen2-VL-7B-Instruct")
|
116 |
text_input = gr.Textbox(label="Question")
|
117 |
submit_btn = gr.Button(value="Submit")
|
118 |
with gr.Column():
|