Spaces:
Running
on
Zero
Running
on
Zero
Add api_name
Browse files
app.py
CHANGED
@@ -227,6 +227,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
227 |
rep_penalty,
|
228 |
],
|
229 |
outputs=caption_output,
|
|
|
230 |
)
|
231 |
|
232 |
chat_inputs = [
|
@@ -254,6 +255,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
254 |
fn=chat,
|
255 |
inputs=chat_inputs,
|
256 |
outputs=chat_outputs,
|
|
|
257 |
)
|
258 |
clear_chat_button.click(
|
259 |
fn=lambda: ('', [], [], []),
|
@@ -265,6 +267,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
265 |
history_qa,
|
266 |
],
|
267 |
queue=False,
|
|
|
268 |
)
|
269 |
image.change(
|
270 |
fn=lambda: ('', [], [], []),
|
@@ -278,4 +281,4 @@ with gr.Blocks(css='style.css') as demo:
|
|
278 |
queue=False,
|
279 |
)
|
280 |
|
281 |
-
demo.queue(max_size=10).launch()
|
|
|
227 |
rep_penalty,
|
228 |
],
|
229 |
outputs=caption_output,
|
230 |
+
api_name='caption',
|
231 |
)
|
232 |
|
233 |
chat_inputs = [
|
|
|
255 |
fn=chat,
|
256 |
inputs=chat_inputs,
|
257 |
outputs=chat_outputs,
|
258 |
+
api_name='chat',
|
259 |
)
|
260 |
clear_chat_button.click(
|
261 |
fn=lambda: ('', [], [], []),
|
|
|
267 |
history_qa,
|
268 |
],
|
269 |
queue=False,
|
270 |
+
api_name='clear',
|
271 |
)
|
272 |
image.change(
|
273 |
fn=lambda: ('', [], [], []),
|
|
|
281 |
queue=False,
|
282 |
)
|
283 |
|
284 |
+
demo.queue(max_size=10, api_open=False).launch()
|