Spaces:
Sleeping
Sleeping
Commit
·
47a81d9
1
Parent(s):
8d8abb6
feat: add kw extraction to session state
Browse files- sorbobotapp/app.py +4 -2
sorbobotapp/app.py
CHANGED
@@ -3,12 +3,12 @@ import os
|
|
3 |
|
4 |
import streamlit as st
|
5 |
import streamlit.components.v1 as components
|
6 |
-
from langchain.callbacks import get_openai_callback
|
7 |
-
|
8 |
from chain import get_chain
|
9 |
from chat_history import insert_chat_history, insert_chat_history_articles
|
10 |
from connection import connect
|
11 |
from css import load_css
|
|
|
|
|
12 |
from message import Message
|
13 |
|
14 |
st.set_page_config(layout="wide")
|
@@ -27,6 +27,8 @@ def initialize_session_state():
|
|
27 |
st.session_state.token_count = 0
|
28 |
if "conversation" not in st.session_state:
|
29 |
st.session_state.conversation = get_chain(conn)
|
|
|
|
|
30 |
|
31 |
|
32 |
def send_message_callback():
|
|
|
3 |
|
4 |
import streamlit as st
|
5 |
import streamlit.components.v1 as components
|
|
|
|
|
6 |
from chain import get_chain
|
7 |
from chat_history import insert_chat_history, insert_chat_history_articles
|
8 |
from connection import connect
|
9 |
from css import load_css
|
10 |
+
from keyword_extraction import KeywordExtractor
|
11 |
+
from langchain.callbacks import get_openai_callback
|
12 |
from message import Message
|
13 |
|
14 |
st.set_page_config(layout="wide")
|
|
|
27 |
st.session_state.token_count = 0
|
28 |
if "conversation" not in st.session_state:
|
29 |
st.session_state.conversation = get_chain(conn)
|
30 |
+
if "keyword_extractor" not in st.session_state:
|
31 |
+
st.session_state.keyword_extractor = KeywordExtractor()
|
32 |
|
33 |
|
34 |
def send_message_callback():
|