fix
Browse files
app.py
CHANGED
|
@@ -6431,13 +6431,17 @@ with gr.Blocks(
|
|
| 6431 |
# Open sidebar after generation; hide the status
|
| 6432 |
return [gr.update(open=True), gr.update(visible=False)]
|
| 6433 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6434 |
btn.click(
|
| 6435 |
begin_generation_ui,
|
| 6436 |
inputs=None,
|
| 6437 |
outputs=[sidebar, generating_status],
|
| 6438 |
show_progress="hidden",
|
| 6439 |
).then(
|
| 6440 |
-
|
| 6441 |
inputs=[input, setting, history, current_model, language_dropdown, provider_state],
|
| 6442 |
outputs=[code_output, history, history_output]
|
| 6443 |
).then(
|
|
@@ -6485,7 +6489,7 @@ with gr.Blocks(
|
|
| 6485 |
outputs=[sidebar, generating_status],
|
| 6486 |
show_progress="hidden",
|
| 6487 |
).then(
|
| 6488 |
-
|
| 6489 |
inputs=[input, setting, history, current_model, language_dropdown, provider_state],
|
| 6490 |
outputs=[code_output, history, history_output]
|
| 6491 |
).then(
|
|
|
|
| 6431 |
# Open sidebar after generation; hide the status
|
| 6432 |
return [gr.update(open=True), gr.update(visible=False)]
|
| 6433 |
|
| 6434 |
+
def generation_code_wrapper(inp, sett, hist, model, lang, prov, profile: gr.OAuthProfile | None = None, token: gr.OAuthToken | None = None):
|
| 6435 |
+
"""Wrapper to call generation_code without image input"""
|
| 6436 |
+
yield from generation_code(inp, None, sett, hist, model, lang, prov, profile, token)
|
| 6437 |
+
|
| 6438 |
btn.click(
|
| 6439 |
begin_generation_ui,
|
| 6440 |
inputs=None,
|
| 6441 |
outputs=[sidebar, generating_status],
|
| 6442 |
show_progress="hidden",
|
| 6443 |
).then(
|
| 6444 |
+
generation_code_wrapper,
|
| 6445 |
inputs=[input, setting, history, current_model, language_dropdown, provider_state],
|
| 6446 |
outputs=[code_output, history, history_output]
|
| 6447 |
).then(
|
|
|
|
| 6489 |
outputs=[sidebar, generating_status],
|
| 6490 |
show_progress="hidden",
|
| 6491 |
).then(
|
| 6492 |
+
generation_code_wrapper,
|
| 6493 |
inputs=[input, setting, history, current_model, language_dropdown, provider_state],
|
| 6494 |
outputs=[code_output, history, history_output]
|
| 6495 |
).then(
|