Spaces:
Paused
Paused
Commit
·
24c9d24
1
Parent(s):
e221fec
new UI
Browse files
app.py
CHANGED
@@ -25,8 +25,6 @@ st.set_page_config(
|
|
25 |
page_icon = '✅')
|
26 |
|
27 |
|
28 |
-
st.markdown("# Hello")
|
29 |
-
|
30 |
|
31 |
@st.cache_data
|
32 |
def load_scraped_web_info():
|
@@ -44,8 +42,8 @@ def load_scraped_web_info():
|
|
44 |
chunked_text = text_splitter.create_documents([doc for doc in tqdm(ait_web_documents)])
|
45 |
|
46 |
|
47 |
-
st.markdown(f"Number of Documents: {len(ait_web_documents)}")
|
48 |
-
st.markdown(f"Number of chunked texts: {len(chunked_text)}")
|
49 |
|
50 |
|
51 |
|
@@ -118,8 +116,8 @@ def retrieve_document(query_input):
|
|
118 |
return related_doc
|
119 |
|
120 |
def retrieve_answer(query_input):
|
121 |
-
|
122 |
-
answer = qa_retriever.run(
|
123 |
output = st.text_area(label="Retrieved documents", value=answer)
|
124 |
|
125 |
st.markdown('---')
|
|
|
25 |
page_icon = '✅')
|
26 |
|
27 |
|
|
|
|
|
28 |
|
29 |
@st.cache_data
|
30 |
def load_scraped_web_info():
|
|
|
42 |
chunked_text = text_splitter.create_documents([doc for doc in tqdm(ait_web_documents)])
|
43 |
|
44 |
|
45 |
+
# st.markdown(f"Number of Documents: {len(ait_web_documents)}")
|
46 |
+
# st.markdown(f"Number of chunked texts: {len(chunked_text)}")
|
47 |
|
48 |
|
49 |
|
|
|
116 |
return related_doc
|
117 |
|
118 |
def retrieve_answer(query_input):
|
119 |
+
prompt_answer= query_input + " " + "Try to elaborate as much as you can."
|
120 |
+
answer = qa_retriever.run(prompt_answer)
|
121 |
output = st.text_area(label="Retrieved documents", value=answer)
|
122 |
|
123 |
st.markdown('---')
|