Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -175,7 +175,7 @@ def prompt_engineer(text, longtext, query):
|
|
| 175 |
except Exception as e:
|
| 176 |
st.error(f"Error invoke: {e}")
|
| 177 |
|
| 178 |
-
return
|
| 179 |
|
| 180 |
def chat_actions():
|
| 181 |
|
|
@@ -212,7 +212,7 @@ def chat_actions():
|
|
| 212 |
p = math.pow(1024, 2)
|
| 213 |
mbsize = round(len(bytesize) / p, 2)
|
| 214 |
st.write(f"Text length of {len(consolidated_text)} characters with {mbsize}MB size")
|
| 215 |
-
|
| 216 |
|
| 217 |
for res in result['matches']:
|
| 218 |
st.session_state["chat_history"].append(
|
|
|
|
| 175 |
except Exception as e:
|
| 176 |
st.error(f"Error invoke: {e}")
|
| 177 |
|
| 178 |
+
return result
|
| 179 |
|
| 180 |
def chat_actions():
|
| 181 |
|
|
|
|
| 212 |
p = math.pow(1024, 2)
|
| 213 |
mbsize = round(len(bytesize) / p, 2)
|
| 214 |
st.write(f"Text length of {len(consolidated_text)} characters with {mbsize}MB size")
|
| 215 |
+
response = prompt_engineer(consolidated_text[:1024], consolidated_text, query)
|
| 216 |
|
| 217 |
for res in result['matches']:
|
| 218 |
st.session_state["chat_history"].append(
|