From 7ce27f15908ca5ae97bc16f56b427fef9805ef2f Mon Sep 17 00:00:00 2001 From: kingdomad <34766852+kingdomad@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:00:15 +0800 Subject: [PATCH] fix: fix string concatenation bug in GradioUI.log_user_message (#199) --- src/smolagents/gradio_ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smolagents/gradio_ui.py b/src/smolagents/gradio_ui.py index 42a4183..8ff25ad 100644 --- a/src/smolagents/gradio_ui.py +++ b/src/smolagents/gradio_ui.py @@ -155,9 +155,9 @@ class GradioUI: def log_user_message(self, text_input, file_uploads_log): return ( text_input - + f"\nYou have been provided with these files, which might be helpful or not: {file_uploads_log}" + + (f"\nYou have been provided with these files, which might be helpful or not: {file_uploads_log}" if len(file_uploads_log) > 0 - else "", + else ""), "", )