Spaces:
Sleeping
Sleeping
Commit ·
3252cb5
1
Parent(s): 0e59558
Refactored
Browse files- views/pages.py +3 -3
views/pages.py
CHANGED
|
@@ -51,7 +51,7 @@ class RAGDemo(Page):
|
|
| 51 |
self.lu.get_pdf_chunks()
|
| 52 |
self.lu.store_pdf_vectors()
|
| 53 |
|
| 54 |
-
txt_question = st.text_area('Ask a question about this document', value='What
|
| 55 |
btn_response = st.button('Submit question')
|
| 56 |
|
| 57 |
citations = ""
|
|
@@ -59,13 +59,13 @@ class RAGDemo(Page):
|
|
| 59 |
|
| 60 |
chunk_size = st.slider('Chunk size', 200, 2000, 1000)
|
| 61 |
chunk_overlap = st.slider('Chunk overlap', 50, 300, 200)
|
| 62 |
-
chunk_count = st.slider('Chunk count', 3, 12,
|
| 63 |
temp = st.slider('Temperature', 0.0, 2.0, 0.0)
|
| 64 |
btn_store = st.button('Update database')
|
| 65 |
|
| 66 |
if btn_response:
|
| 67 |
if txt_question:
|
| 68 |
-
response, docs = self.lu.get_response(txt_question,
|
| 69 |
st.text_area('Response', value=response, height=300)
|
| 70 |
|
| 71 |
if docs is not None:
|
|
|
|
| 51 |
self.lu.get_pdf_chunks()
|
| 52 |
self.lu.store_pdf_vectors()
|
| 53 |
|
| 54 |
+
txt_question = st.text_area('Ask a question about this document', value='What rights does a buyer have if they receive an item that does not match its description')
|
| 55 |
btn_response = st.button('Submit question')
|
| 56 |
|
| 57 |
citations = ""
|
|
|
|
| 59 |
|
| 60 |
chunk_size = st.slider('Chunk size', 200, 2000, 1000)
|
| 61 |
chunk_overlap = st.slider('Chunk overlap', 50, 300, 200)
|
| 62 |
+
chunk_count = st.slider('Chunk count', 3, 12, 4)
|
| 63 |
temp = st.slider('Temperature', 0.0, 2.0, 0.0)
|
| 64 |
btn_store = st.button('Update database')
|
| 65 |
|
| 66 |
if btn_response:
|
| 67 |
if txt_question:
|
| 68 |
+
response, docs = self.lu.get_response(txt_question, chunk_count)
|
| 69 |
st.text_area('Response', value=response, height=300)
|
| 70 |
|
| 71 |
if docs is not None:
|