Update app.py
Browse files
app.py
CHANGED
@@ -33,8 +33,11 @@ if user_input := st.chat_input("What is up?"):
|
|
33 |
# Extract assistant response
|
34 |
if bot_reply !=[]:
|
35 |
assistant_response = ""
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
38 |
else:
|
39 |
assistant_response = 'API request returned with an empty list []. Please continue with a different question'
|
40 |
|
|
|
33 |
# Extract assistant response
|
34 |
if bot_reply !=[]:
|
35 |
assistant_response = ""
|
36 |
+
if len(bot_reply)>1:
|
37 |
+
for reply in bot_reply[1:]:
|
38 |
+
assistant_response+=(" "+reply['text'])
|
39 |
+
else:
|
40 |
+
assistant_response = bot_reply[0]['text']
|
41 |
else:
|
42 |
assistant_response = 'API request returned with an empty list []. Please continue with a different question'
|
43 |
|