Spaces:
Paused
Paused
hanoch.rahimi@gmail
commited on
Commit
·
015bddc
1
Parent(s):
0c14e18
wip
Browse files- .gitignore +1 -0
- app.py +11 -10
.gitignore
CHANGED
|
@@ -3,5 +3,6 @@ bin/
|
|
| 3 |
obj/
|
| 4 |
*.pyproj.user
|
| 5 |
.streamlit/secrets.toml
|
|
|
|
| 6 |
|
| 7 |
__pycache__/
|
|
|
|
| 3 |
obj/
|
| 4 |
*.pyproj.user
|
| 5 |
.streamlit/secrets.toml
|
| 6 |
+
.env
|
| 7 |
|
| 8 |
__pycache__/
|
app.py
CHANGED
|
@@ -172,16 +172,17 @@ def run_query(query, report_type, top_k , regions, countries, is_debug, index_na
|
|
| 172 |
#descriptions = "\n".join([f"Description of company \"{res['name']}\": {res['data']['Summary']}.\n" for res in results[:20] if 'Summary' in res['data']])
|
| 173 |
messages = oai.call_assistant(query, engine=openai_model)
|
| 174 |
results = st.session_state.db_search_results
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
st.
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
|
|
|
| 185 |
# st.session_state.messages.append({"role": "user", "content": query})
|
| 186 |
# st.session_state.messages.append({"role": "system", "content": m_text})
|
| 187 |
|
|
|
|
| 172 |
#descriptions = "\n".join([f"Description of company \"{res['name']}\": {res['data']['Summary']}.\n" for res in results[:20] if 'Summary' in res['data']])
|
| 173 |
messages = oai.call_assistant(query, engine=openai_model)
|
| 174 |
results = st.session_state.db_search_results
|
| 175 |
+
if not messages is None:
|
| 176 |
+
with content_container:
|
| 177 |
+
for message in list(messages)[::-1]:
|
| 178 |
+
with st.chat_message(name = message.role):
|
| 179 |
+
st.write(message.content[0].text.value)
|
| 180 |
+
# if message.role == "assistant":
|
| 181 |
+
# with st.chat_message(name = message.role, avatar = st.image("resources/raized_logo.png")):
|
| 182 |
+
# st.write(message.content[0].text.value)
|
| 183 |
+
# else:
|
| 184 |
+
# with st.chat_message(name = message.role):
|
| 185 |
+
# st.write(message.content[0].text.value)
|
| 186 |
# st.session_state.messages.append({"role": "user", "content": query})
|
| 187 |
# st.session_state.messages.append({"role": "system", "content": m_text})
|
| 188 |
|