prasadnu commited on
Commit
44923dc
·
1 Parent(s): 9ace242

RAG changes

Browse files
pages/Multimodal_Conversational_Search.py CHANGED
@@ -491,34 +491,6 @@ with st.sidebar:
491
  st.markdown("<span style = 'color:#FF9900;'>Global Warming stats</span> - What is the projected energy percentage from renewable sources in future?",unsafe_allow_html=True)
492
  st.markdown("<span style = 'color:#FF9900;'>Covid19 impacts</span> - How many aged above 85 years died due to covid ?",unsafe_allow_html=True)
493
 
494
- # Initialize boto3 to use the S3 client.
495
- s3_client = boto3.resource('s3')
496
- bucket=s3_client.Bucket(s3_bucket_)
497
-
498
- objects = bucket.objects.filter(Prefix="sample_pdfs/")
499
- urls = []
500
-
501
- client = boto3.client('s3')
502
-
503
- for obj in objects:
504
- if obj.key.endswith('.pdf'):
505
-
506
- # Generate the S3 presigned URL
507
- s3_presigned_url = client.generate_presigned_url(
508
- ClientMethod='get_object',
509
- Params={
510
- 'Bucket': s3_bucket_,
511
- 'Key': obj.key
512
- },
513
- ExpiresIn=3600
514
- )
515
-
516
- # Print the created S3 presigned URL
517
- print(s3_presigned_url)
518
- urls.append(s3_presigned_url)
519
- #st.write("["+obj.key.split('/')[1]+"]("+s3_presigned_url+")")
520
- st.link_button(obj.key.split('/')[1], s3_presigned_url)
521
-
522
 
523
  # st.subheader(":blue[Your multi-modal documents]")
524
  # pdf_doc_ = st.file_uploader(
 
491
  st.markdown("<span style = 'color:#FF9900;'>Global Warming stats</span> - What is the projected energy percentage from renewable sources in future?",unsafe_allow_html=True)
492
  st.markdown("<span style = 'color:#FF9900;'>Covid19 impacts</span> - How many aged above 85 years died due to covid ?",unsafe_allow_html=True)
493
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
494
 
495
  # st.subheader(":blue[Your multi-modal documents]")
496
  # pdf_doc_ = st.file_uploader(