From 2ce3247069cd34fad74d57e617ed2792991d0544 Mon Sep 17 00:00:00 2001 From: Dawood Date: Thu, 24 Oct 2024 02:32:22 -0400 Subject: [PATCH] fix --- gradio/chat_interface.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gradio/chat_interface.py b/gradio/chat_interface.py index 5b58867894b0c..6ee36ada3150a 100644 --- a/gradio/chat_interface.py +++ b/gradio/chat_interface.py @@ -731,8 +731,15 @@ def _process_example( def _additional_inputs_in_examples(self): if self.examples is not None: for example in self.examples: - if isinstance(example, list) and len(example) > 1: - return True + for idx, example_for_input in enumerate(example): + if example_for_input is not None: + try: + if idx > 0: + return True + else: + continue + except IndexError: + return False return False async def _examples_fn(