Skip to content

bug fix: fix string concatenation bug in GradioUI.log_user_message #199

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

Conversation

kingdomad
Copy link
Contributor

File: src/smolagents/gradio_ui.py

Bug impact:
When no files are uploaded, the Gradio UI completely ignores user's text input
due to incorrect string concatenation precedence.

Changes:

  • Add parentheses to ensure correct operator precedence in string concatenation
  • Fix text_input being ignored when file_uploads_log is empty

@aymeric-roucher aymeric-roucher merged commit 7ce27f1 into huggingface:main Jan 15, 2025
@aymeric-roucher
Copy link
Contributor

Thanks a lot @kingdomad !

@kingdomad kingdomad deleted the fix-bug-log-user-message-concatenation branch January 23, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants