Spaces:
Running
on
Zero
Running
on
Zero
fancyfeast
commited on
Commit
·
248feb4
1
Parent(s):
2fb728d
Derp
Browse files
app.py
CHANGED
@@ -80,7 +80,8 @@ def chat_joycaption(message: dict, history, temperature: float, max_new_tokens:
|
|
80 |
|
81 |
# Load image
|
82 |
if "files" not in message or len(message["files"]) != 1:
|
83 |
-
|
|
|
84 |
|
85 |
image = Image.open(message["files"][0])
|
86 |
|
@@ -169,6 +170,7 @@ with gr.Blocks() as demo:
|
|
169 |
fn=chat_joycaption,
|
170 |
chatbot=chatbot,
|
171 |
fill_height=True,
|
|
|
172 |
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
173 |
additional_inputs=[
|
174 |
gr.Slider(minimum=0,
|
|
|
80 |
|
81 |
# Load image
|
82 |
if "files" not in message or len(message["files"]) != 1:
|
83 |
+
yield "ERROR: This model requires exactly one image as input."
|
84 |
+
return
|
85 |
|
86 |
image = Image.open(message["files"][0])
|
87 |
|
|
|
170 |
fn=chat_joycaption,
|
171 |
chatbot=chatbot,
|
172 |
fill_height=True,
|
173 |
+
multimodal=True,
|
174 |
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
175 |
additional_inputs=[
|
176 |
gr.Slider(minimum=0,
|