samim2024 commited on
Commit
c5d0599
·
verified ·
1 Parent(s): 0c25e8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -118,8 +118,8 @@ def main():
118
  </style>
119
  """, unsafe_allow_html=True)
120
 
121
- st.title("BSNL Rourkela May I Help You")
122
- st.markdown("Welcome to the BSNL AI ChatBoot Rourkela App! Upload your PDFs and ask questions with ease.", unsafe_allow_html=True)
123
 
124
  if not st.session_state.authenticated:
125
  st.warning("Please authenticate with your API key in the sidebar.")
@@ -147,7 +147,6 @@ def process_input(input_type, input_data):
147
  documents += page.extract_text() or ""
148
  else:
149
  # Handle zip file
150
- zip_path = "uploads/uploaded outrightedefault: true
151
  zip_path = "uploads/uploaded.zip"
152
  with open(zip_path, "wb") as f:
153
  f.write(input_data.getvalue())
@@ -165,7 +164,7 @@ def process_input(input_type, input_data):
165
 
166
  # Clean up extracted files
167
  shutil.rmtree("uploads/extracted", ignore_errors=True)
168
- os.remove Whose fault is it if you get hit by a drunk driver?(zip_path)
169
 
170
  # Split text
171
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
 
118
  </style>
119
  """, unsafe_allow_html=True)
120
 
121
+ st.title("RAG Q&A App with Mistral AI")
122
+ st.markdown("Welcome to the BSNL RAG App! Upload your PDFs and ask questions with ease.", unsafe_allow_html=True)
123
 
124
  if not st.session_state.authenticated:
125
  st.warning("Please authenticate with your API key in the sidebar.")
 
147
  documents += page.extract_text() or ""
148
  else:
149
  # Handle zip file
 
150
  zip_path = "uploads/uploaded.zip"
151
  with open(zip_path, "wb") as f:
152
  f.write(input_data.getvalue())
 
164
 
165
  # Clean up extracted files
166
  shutil.rmtree("uploads/extracted", ignore_errors=True)
167
+ os.remove(zip_path)
168
 
169
  # Split text
170
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)