Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,12 +33,12 @@ def array_to_image_path(image_array):
|
|
33 |
return full_path
|
34 |
|
35 |
models = {
|
36 |
-
"mateoluksenberg/
|
37 |
|
38 |
}
|
39 |
|
40 |
processors = {
|
41 |
-
"mateoluksenberg/
|
42 |
}
|
43 |
|
44 |
DESCRIPTION = "[Qwen2-VL-2B Demo](https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct)"
|
@@ -51,7 +51,7 @@ assistant_prompt = '<|assistant|>\n'
|
|
51 |
prompt_suffix = "<|end|>\n"
|
52 |
|
53 |
@spaces.GPU
|
54 |
-
def run_example(image, text_input=None, model_id="mateoluksenberg/
|
55 |
image_path = array_to_image_path(image)
|
56 |
|
57 |
print(image_path)
|
@@ -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="mateoluksenberg/
|
116 |
text_input = gr.Textbox(label="Question")
|
117 |
submit_btn = gr.Button(value="Submit")
|
118 |
with gr.Column():
|
|
|
33 |
return full_path
|
34 |
|
35 |
models = {
|
36 |
+
"mateoluksenberg/Qwen-modelo-image": Qwen2VLForConditionalGeneration.from_pretrained("mateoluksenberg/Qwen-modelo-image", trust_remote_code=True, torch_dtype="auto").cuda().eval()
|
37 |
|
38 |
}
|
39 |
|
40 |
processors = {
|
41 |
+
"mateoluksenberg/Qwen-modelo-image": AutoProcessor.from_pretrained("mateoluksenberg/Qwen-modelo-image", trust_remote_code=True)
|
42 |
}
|
43 |
|
44 |
DESCRIPTION = "[Qwen2-VL-2B Demo](https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct)"
|
|
|
51 |
prompt_suffix = "<|end|>\n"
|
52 |
|
53 |
@spaces.GPU
|
54 |
+
def run_example(image, text_input=None, model_id="mateoluksenberg/Qwen-modelo-image"):
|
55 |
image_path = array_to_image_path(image)
|
56 |
|
57 |
print(image_path)
|
|
|
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="mateoluksenberg/Qwen-modelo-image")
|
116 |
text_input = gr.Textbox(label="Question")
|
117 |
submit_btn = gr.Button(value="Submit")
|
118 |
with gr.Column():
|