From 6a8f83f2b7e383e84af79738d05cabc2dc78f149 Mon Sep 17 00:00:00 2001 From: Adrian Charkiewicz Date: Sun, 18 Jun 2023 09:30:16 +0200 Subject: [PATCH] unnecessary tab in graph generation deleted --- ai_talks/chat.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ai_talks/chat.py b/ai_talks/chat.py index 05faa7d..fbe22c1 100644 --- a/ai_talks/chat.py +++ b/ai_talks/chat.py @@ -90,10 +90,10 @@ def show_graph(): chatbot_text = [word + '\n' if i % 5 == 0 and i > 0 else word for i, word in enumerate(chatbot[x].split(' '))] user_text = [word + '\n' if i % 5 == 0 and i > 0 else word for i, word in enumerate(user[x].split(' '))] graph.edge(' '.join(chatbot_text), ' '.join(user_text)) - try: - graph.edge(' '.join(user_text), ' '.join([word + '\n' if i % 5 == 0 and i > 0 else word for i, word in enumerate(chatbot[x + 1].split(' '))])) - except: - pass + try: + graph.edge(' '.join(user_text), ' '.join([word + '\n' if i % 5 == 0 and i > 0 else word for i, word in enumerate(chatbot[x + 1].split(' '))])) + except: + pass st.graphviz_chart(graph)