raj999 commited on
Commit
1000a42
·
verified ·
1 Parent(s): 38ce414

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -65,11 +65,11 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
65
  return response['answer']
66
 
67
  def upload_file(filepath):
68
- # text = extract_text_from_pdf(filepath)
69
- # tables = extract_tables_from_pdf(filepath)
70
 
71
  # Update documents in the vector store
72
- # update_documents(text)
73
 
74
  return [gr.UploadButton(visible=False), gr.DownloadButton(label=f"Download {Path(filepath).name}", value=filepath, visible=True), f"{len(tables)} tables extracted."]
75
 
 
65
  return response['answer']
66
 
67
  def upload_file(filepath):
68
+ text = extract_text_from_pdf(filepath)
69
+ tables = extract_tables_from_pdf(filepath)
70
 
71
  # Update documents in the vector store
72
+ update_documents(text)
73
 
74
  return [gr.UploadButton(visible=False), gr.DownloadButton(label=f"Download {Path(filepath).name}", value=filepath, visible=True), f"{len(tables)} tables extracted."]
75