Spaces:
Running
Running
Fix bug in image loader v2
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def greet(image, audio):
|
|
53 |
vt.Normalize((0.48145466, 0.4578275, 0.40821073), (0.26862954, 0.26130258, 0.27577711)), # CLIP
|
54 |
])
|
55 |
|
56 |
-
image_file = image_transform(image).
|
57 |
|
58 |
# Inference
|
59 |
placeholder_tokens = model.get_placeholder_token(prompt_template.replace('{}', ''))
|
@@ -77,7 +77,7 @@ demo = gr.Interface(
|
|
77 |
fn=greet,
|
78 |
inputs=[gr.Image(type='pil'), gr.Audio()],
|
79 |
outputs=gr.Image(type="pil"),
|
80 |
-
title=
|
81 |
description=description,
|
82 |
)
|
83 |
|
|
|
53 |
vt.Normalize((0.48145466, 0.4578275, 0.40821073), (0.26862954, 0.26130258, 0.27577711)), # CLIP
|
54 |
])
|
55 |
|
56 |
+
image_file = image_transform(image).unsqueeze(0)
|
57 |
|
58 |
# Inference
|
59 |
placeholder_tokens = model.get_placeholder_token(prompt_template.replace('{}', ''))
|
|
|
77 |
fn=greet,
|
78 |
inputs=[gr.Image(type='pil'), gr.Audio()],
|
79 |
outputs=gr.Image(type="pil"),
|
80 |
+
title=title,
|
81 |
description=description,
|
82 |
)
|
83 |
|