Spaces:
Running
Running
Dongxu Li
commited on
Commit
·
7ca3a4a
1
Parent(s):
20366bb
change ui
Browse files
app.py
CHANGED
|
@@ -125,11 +125,11 @@ def inference_caption(
|
|
| 125 |
return output[0]
|
| 126 |
|
| 127 |
|
| 128 |
-
def clear_fn(image_input, chatbot, chat_input, caption_output, state):
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
|
| 134 |
|
| 135 |
title = """<h1 align="center">BLIP-2</h1>"""
|
|
@@ -249,9 +249,9 @@ with gr.Blocks() as iface:
|
|
| 249 |
)
|
| 250 |
|
| 251 |
image_input.change(
|
| 252 |
-
|
| 253 |
-
[
|
| 254 |
-
[chatbot,
|
| 255 |
)
|
| 256 |
|
| 257 |
examples = gr.Examples(
|
|
|
|
| 125 |
return output[0]
|
| 126 |
|
| 127 |
|
| 128 |
+
# def clear_fn(image_input, chatbot, chat_input, caption_output, state):
|
| 129 |
+
# # if image_input is None:
|
| 130 |
+
# return (None, "", "", [])
|
| 131 |
+
# else:
|
| 132 |
+
# return chatbot, chat_input, caption_output, state
|
| 133 |
|
| 134 |
|
| 135 |
title = """<h1 align="center">BLIP-2</h1>"""
|
|
|
|
| 249 |
)
|
| 250 |
|
| 251 |
image_input.change(
|
| 252 |
+
lambda: ("", "", []),
|
| 253 |
+
[],
|
| 254 |
+
[chatbot, caption_output, state]
|
| 255 |
)
|
| 256 |
|
| 257 |
examples = gr.Examples(
|