Spaces:
Runtime error
Runtime error
Update chat.py
Browse files
chat.py
CHANGED
|
@@ -96,7 +96,10 @@ if login():
|
|
| 96 |
print(type(msg.content))
|
| 97 |
st.write(f"*{datetime.datetime.fromtimestamp(msg.additional_kwargs['timestamp']).isoformat()}*")
|
| 98 |
st.write("Retrieved from knowledge base:")
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
| 100 |
else:
|
| 101 |
if len(msg.content) > 0:
|
| 102 |
with st.chat_message(speaker):
|
|
|
|
| 96 |
print(type(msg.content))
|
| 97 |
st.write(f"*{datetime.datetime.fromtimestamp(msg.additional_kwargs['timestamp']).isoformat()}*")
|
| 98 |
st.write("Retrieved from knowledge base:")
|
| 99 |
+
try:
|
| 100 |
+
st.dataframe(pd.DataFrame.from_records(map(dict, eval(msg.content))))
|
| 101 |
+
except:
|
| 102 |
+
st.write(msg.content)
|
| 103 |
else:
|
| 104 |
if len(msg.content) > 0:
|
| 105 |
with st.chat_message(speaker):
|