Spaces:
Runtime error
Runtime error
update to display only summary in chat
Browse files
app.py
CHANGED
|
@@ -100,6 +100,8 @@ def promt_engineer(text):
|
|
| 100 |
st.write(summary)
|
| 101 |
st.divider()
|
| 102 |
|
|
|
|
|
|
|
| 103 |
def chat_actions():
|
| 104 |
|
| 105 |
pinecone = connect_pinecone()
|
|
@@ -134,13 +136,13 @@ def chat_actions():
|
|
| 134 |
p = math.pow(1024, 2)
|
| 135 |
mbsize = round(len(bytesize) / p, 2)
|
| 136 |
st.write(f"Text lenth of {len(consolidated_text)} characters with {mbsize}MB size")
|
| 137 |
-
promt_engineer(consolidated_text[:1024])
|
| 138 |
|
| 139 |
for res in result['matches']:
|
| 140 |
st.session_state["chat_history"].append(
|
| 141 |
{
|
| 142 |
"role": "assistant",
|
| 143 |
-
"content": f"{
|
| 144 |
}, # This can be replaced with your chat response logic
|
| 145 |
)
|
| 146 |
break;
|
|
|
|
| 100 |
st.write(summary)
|
| 101 |
st.divider()
|
| 102 |
|
| 103 |
+
return summary
|
| 104 |
+
|
| 105 |
def chat_actions():
|
| 106 |
|
| 107 |
pinecone = connect_pinecone()
|
|
|
|
| 136 |
p = math.pow(1024, 2)
|
| 137 |
mbsize = round(len(bytesize) / p, 2)
|
| 138 |
st.write(f"Text lenth of {len(consolidated_text)} characters with {mbsize}MB size")
|
| 139 |
+
summary = promt_engineer(consolidated_text[:1024])
|
| 140 |
|
| 141 |
for res in result['matches']:
|
| 142 |
st.session_state["chat_history"].append(
|
| 143 |
{
|
| 144 |
"role": "assistant",
|
| 145 |
+
"content": f"{summary}",
|
| 146 |
}, # This can be replaced with your chat response logic
|
| 147 |
)
|
| 148 |
break;
|