wylum commited on
Commit
7cbcc0a
·
verified ·
1 Parent(s): 08e6735

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -199,11 +199,14 @@ def create_collection_name(filepath):
199
 
200
  #collection_name, vector_db, btn, llm_btn, slider_temperature, slider_maxtokens, slider_topk]
201
  def build_qa_chain(collection_name, vector_db, file: str, llm_option, temperature, max_tokens, top_k, progress=gr.Progress()):
202
- print("in build_qa_chain="+file.name)
203
 
204
- if file == None:
205
  raise gr.Error("Please upload a PDF first!")
206
 
 
 
 
 
207
  documents, file_name = process_file2(file)
208
 
209
  # Load embeddings model
 
199
 
200
  #collection_name, vector_db, btn, llm_btn, slider_temperature, slider_maxtokens, slider_topk]
201
  def build_qa_chain(collection_name, vector_db, file: str, llm_option, temperature, max_tokens, top_k, progress=gr.Progress()):
 
202
 
203
+ if file == None or not file:
204
  raise gr.Error("Please upload a PDF first!")
205
 
206
+ print("in build_qa_chain="+file.name)
207
+
208
+
209
+
210
  documents, file_name = process_file2(file)
211
 
212
  # Load embeddings model