Spaces:
Runtime error
Runtime error
Damien Benveniste
commited on
Commit
·
e903025
1
Parent(s):
0f8141c
corrected
Browse files- pages/filtered_rag_page.py +1 -1
- pages/history_page.py +1 -1
- pages/page_base.py +4 -1
- pages/rag_page.py +1 -1
pages/filtered_rag_page.py
CHANGED
@@ -6,4 +6,4 @@ chat_title = "Filtered RAG Chat App"
|
|
6 |
url = "https://damienbenveniste-backend.hf.space/filtered_rag"
|
7 |
page_hash = get_script_run_ctx().page_script_hash
|
8 |
|
9 |
-
chat_interface(chat_title, page_hash, url
|
|
|
6 |
url = "https://damienbenveniste-backend.hf.space/filtered_rag"
|
7 |
page_hash = get_script_run_ctx().page_script_hash
|
8 |
|
9 |
+
chat_interface(chat_title, page_hash, url)
|
pages/history_page.py
CHANGED
@@ -6,4 +6,4 @@ chat_title = "History Chat App"
|
|
6 |
url = "https://damienbenveniste-backend.hf.space/history"
|
7 |
page_hash = get_script_run_ctx().page_script_hash
|
8 |
|
9 |
-
chat_interface(chat_title, page_hash, url
|
|
|
6 |
url = "https://damienbenveniste-backend.hf.space/history"
|
7 |
page_hash = get_script_run_ctx().page_script_hash
|
8 |
|
9 |
+
chat_interface(chat_title, page_hash, url)
|
pages/page_base.py
CHANGED
@@ -12,9 +12,12 @@ def get_response(user_input, url, username):
|
|
12 |
|
13 |
return full_response
|
14 |
|
15 |
-
def chat_interface(chat_title, page_hash ,url
|
16 |
st.title(chat_title)
|
17 |
|
|
|
|
|
|
|
18 |
# Initialize page-specific chat history
|
19 |
if "chat_histories" not in st.session_state:
|
20 |
st.session_state.chat_histories = {}
|
|
|
12 |
|
13 |
return full_response
|
14 |
|
15 |
+
def chat_interface(chat_title, page_hash ,url):
|
16 |
st.title(chat_title)
|
17 |
|
18 |
+
# Add username input at the top of the page
|
19 |
+
username = st.text_input("Enter your username:", key="username_input", value="Guest")
|
20 |
+
|
21 |
# Initialize page-specific chat history
|
22 |
if "chat_histories" not in st.session_state:
|
23 |
st.session_state.chat_histories = {}
|
pages/rag_page.py
CHANGED
@@ -6,4 +6,4 @@ chat_title = "RAG Chat App"
|
|
6 |
url = "https://damienbenveniste-backend.hf.space/rag"
|
7 |
page_hash = get_script_run_ctx().page_script_hash
|
8 |
|
9 |
-
chat_interface(chat_title, page_hash, url
|
|
|
6 |
url = "https://damienbenveniste-backend.hf.space/rag"
|
7 |
page_hash = get_script_run_ctx().page_script_hash
|
8 |
|
9 |
+
chat_interface(chat_title, page_hash, url)
|