Spaces:
Running
on
T4
Running
on
T4
code cleanup
Browse files
pages/AI_Shopping_Assistant.py
CHANGED
@@ -491,7 +491,7 @@ with col_3:
|
|
491 |
#hidden = st.button("RUN",disabled=True,key = "hidden")
|
492 |
# audio_value = st.audio_input("Record a voice message")
|
493 |
# print(audio_value)
|
494 |
-
play = st.button("
|
495 |
#with st.sidebar:
|
496 |
# st.page_link("/home/ubuntu/AI-search-with-amazon-opensearch-service/OpenSearchApp/app.py", label=":orange[Home]", icon="🏠")
|
497 |
# st.subheader(":blue[Sample Data]")
|
|
|
491 |
#hidden = st.button("RUN",disabled=True,key = "hidden")
|
492 |
# audio_value = st.audio_input("Record a voice message")
|
493 |
# print(audio_value)
|
494 |
+
play = st.button("Go",on_click=handle_input,key = "play")
|
495 |
#with st.sidebar:
|
496 |
# st.page_link("/home/ubuntu/AI-search-with-amazon-opensearch-service/OpenSearchApp/app.py", label=":orange[Home]", icon="🏠")
|
497 |
# st.subheader(":blue[Sample Data]")
|
pages/Multimodal_Conversational_Search.py
CHANGED
@@ -439,7 +439,7 @@ with col_2:
|
|
439 |
input = st.text_input( "Ask here",label_visibility = "collapsed",key="input_query")
|
440 |
with col_3:
|
441 |
#hidden = st.button("RUN",disabled=True,key = "hidden")
|
442 |
-
play = st.button("
|
443 |
with st.sidebar:
|
444 |
st.page_link("app.py", label=":orange[Home]", icon="🏠")
|
445 |
st.subheader(":blue[Sample Data]")
|
@@ -468,29 +468,29 @@ with st.sidebar:
|
|
468 |
|
469 |
|
470 |
#st.subheader(":blue[Your multi-modal documents]")
|
471 |
-
pdf_doc_ = st.file_uploader(
|
472 |
-
|
473 |
|
474 |
|
475 |
-
pdf_docs = [pdf_doc_]
|
476 |
-
if st.button("Process"):
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
|
495 |
############## haystach demo temporary addition ############
|
496 |
# st.subheader(":blue[Multimodality]")
|
|
|
439 |
input = st.text_input( "Ask here",label_visibility = "collapsed",key="input_query")
|
440 |
with col_3:
|
441 |
#hidden = st.button("RUN",disabled=True,key = "hidden")
|
442 |
+
play = st.button("Go",on_click=handle_input,key = "play")
|
443 |
with st.sidebar:
|
444 |
st.page_link("app.py", label=":orange[Home]", icon="🏠")
|
445 |
st.subheader(":blue[Sample Data]")
|
|
|
468 |
|
469 |
|
470 |
#st.subheader(":blue[Your multi-modal documents]")
|
471 |
+
# pdf_doc_ = st.file_uploader(
|
472 |
+
# "Upload your PDFs here and click on 'Process'", accept_multiple_files=False)
|
473 |
|
474 |
|
475 |
+
# pdf_docs = [pdf_doc_]
|
476 |
+
# if st.button("Process"):
|
477 |
+
# with st.spinner("Processing"):
|
478 |
+
# if os.path.isdir(parent_dirname+"/pdfs") == False:
|
479 |
+
# os.mkdir(parent_dirname+"/pdfs")
|
480 |
|
481 |
+
# for pdf_doc in pdf_docs:
|
482 |
+
# print(type(pdf_doc))
|
483 |
+
# pdf_doc_name = (pdf_doc.name).replace(" ","_")
|
484 |
+
# with open(os.path.join(parent_dirname+"/pdfs",pdf_doc_name),"wb") as f:
|
485 |
+
# f.write(pdf_doc.getbuffer())
|
486 |
|
487 |
+
# request_ = { "bucket": s3_bucket_,"key": pdf_doc_name}
|
488 |
+
# # if(st.session_state.input_copali_rerank):
|
489 |
+
# # copali.process_doc(request_)
|
490 |
+
# # else:
|
491 |
+
# rag_DocumentLoader.load_docs(request_)
|
492 |
+
# print('lambda done')
|
493 |
+
# st.success('you can start searching on your PDF')
|
494 |
|
495 |
############## haystach demo temporary addition ############
|
496 |
# st.subheader(":blue[Multimodality]")
|