Update pages/rag_page.py
Browse files- pages/rag_page.py +3 -3
pages/rag_page.py
CHANGED
|
@@ -2,7 +2,7 @@ from streamlit.runtime.scriptrunner import get_script_run_ctx
|
|
| 2 |
#from pages.page_base import chat_interface
|
| 3 |
import streamlit as st
|
| 4 |
from langserve import RemoteRunnable
|
| 5 |
-
chat_title = "RAG Chat App"
|
| 6 |
st.title('RAG Chat App')
|
| 7 |
username = st.text_input(
|
| 8 |
"Enter your username:",
|
|
@@ -10,7 +10,7 @@ username = st.text_input(
|
|
| 10 |
value="Guest"
|
| 11 |
)
|
| 12 |
|
| 13 |
-
url = "https://wang16888-backend1.hf.space"
|
| 14 |
def get_response(user_input, url, username):
|
| 15 |
response_placeholder = st.empty()
|
| 16 |
full_response = ""
|
|
@@ -43,6 +43,6 @@ if prompt := st.chat_input("What is your message?"):
|
|
| 43 |
"role": "assistant",
|
| 44 |
"content": full_response
|
| 45 |
})
|
| 46 |
-
page_hash = get_script_run_ctx().page_script_hash
|
| 47 |
|
| 48 |
#chat_interface(username, page_hash, url)
|
|
|
|
| 2 |
#from pages.page_base import chat_interface
|
| 3 |
import streamlit as st
|
| 4 |
from langserve import RemoteRunnable
|
| 5 |
+
#chat_title = "RAG Chat App"
|
| 6 |
st.title('RAG Chat App')
|
| 7 |
username = st.text_input(
|
| 8 |
"Enter your username:",
|
|
|
|
| 10 |
value="Guest"
|
| 11 |
)
|
| 12 |
|
| 13 |
+
url = "https://wang16888-backend1.hf.space/rag"
|
| 14 |
def get_response(user_input, url, username):
|
| 15 |
response_placeholder = st.empty()
|
| 16 |
full_response = ""
|
|
|
|
| 43 |
"role": "assistant",
|
| 44 |
"content": full_response
|
| 45 |
})
|
| 46 |
+
#page_hash = get_script_run_ctx().page_script_hash
|
| 47 |
|
| 48 |
#chat_interface(username, page_hash, url)
|