Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit button not disabled when streaming (chatbot) #4342

Closed
1 task done
bent-verbiage opened this issue May 27, 2023 · 0 comments · Fixed by #4363
Closed
1 task done

Submit button not disabled when streaming (chatbot) #4342

bent-verbiage opened this issue May 27, 2023 · 0 comments · Fixed by #4363
Assignees
Labels
bug Something isn't working

Comments

@bent-verbiage
Copy link

bent-verbiage commented May 27, 2023

Describe the bug

Following the chatbot streaming method that is showcased in the chatbot_streaming_main on HuggingFace, the submit (and the textarea field) are not disabled while the chatbot is streaming. For longer bot responses this is causing issues.

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

The input box (and submit event) are not blocked while the bot is streaming and gives unexpected behaviour. This is likely because the "user" function has returned and then releases the disabled fields before it moves on to the "bot" function.

msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then( bot, chatbot, chatbot)

One solution would be to keep the disabled status during the "then" function, or otherwise make it possible to manually disable and enable fields in the gradio code.

Screenshot

No response

Logs

No errors are shown, it is resulting in unexpected UI behaviour.

System Info

Gradio==3.32.0

Severity

serious, but I can work around it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants