Kushwanth Chowday Kandala commited on
Commit
3ae066d
1 Parent(s): 2376b2f

AttributeError: 'numpy.ndarray' object has no attribute 'text'

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,6 +1,8 @@
1
  import streamlit as st
2
  import os
3
  from streamlit_chat import message
 
 
4
 
5
  # st.config(PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python")
6
 
@@ -67,7 +69,7 @@ def get_pinecone_semantic_index(pinecone):
67
  )
68
  # now connect to index
69
  index = PineconeGRPC(index_name)
70
- st.text(f"Succesfully connected to the pinecone")
71
  return index
72
 
73
  def chat_actions():
@@ -83,7 +85,7 @@ def chat_actions():
83
  st.session_state["chat_history"].append(
84
  {
85
  "role": "assistant",
86
- "content": response.text,
87
  }, # This can be replaced with your chat response logic
88
  )
89
 
 
1
  import streamlit as st
2
  import os
3
  from streamlit_chat import message
4
+ import numpy as np
5
+ import pandas as pd
6
 
7
  # st.config(PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python")
8
 
 
69
  )
70
  # now connect to index
71
  index = PineconeGRPC(index_name)
72
+ st.text(f"Succesfully connected to the pinecone index")
73
  return index
74
 
75
  def chat_actions():
 
85
  st.session_state["chat_history"].append(
86
  {
87
  "role": "assistant",
88
+ "content": st.table(pd.DataFrame(response)),
89
  }, # This can be replaced with your chat response logic
90
  )
91