Spaces:
No application file
No application file
cleaning up debug code
Browse files
api/event_handlers/gradio_handler.py
CHANGED
@@ -67,7 +67,7 @@ class GradioEventHandler(AsyncCallbackHandler):
|
|
67 |
async def on_tool_end(self, output: any, **kwargs):
|
68 |
print(f"\n{Fore.CYAN}[TOOL END] {output}{Style.RESET_ALL}")
|
69 |
for doc in output:
|
70 |
-
if
|
71 |
img = image_base.format(filename=self.get_image_filename(doc))
|
72 |
print(f"\n{Fore.YELLOW}[TOOL END] {img}{Style.RESET_ALL}")
|
73 |
self.ots_box(img)
|
|
|
67 |
async def on_tool_end(self, output: any, **kwargs):
|
68 |
print(f"\n{Fore.CYAN}[TOOL END] {output}{Style.RESET_ALL}")
|
69 |
for doc in output:
|
70 |
+
if doc.metadata.get("show_profile_card"):
|
71 |
img = image_base.format(filename=self.get_image_filename(doc))
|
72 |
print(f"\n{Fore.YELLOW}[TOOL END] {img}{Style.RESET_ALL}")
|
73 |
self.ots_box(img)
|