awacke1 commited on
Commit
7de19d2
·
1 Parent(s): 809c729

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -84,7 +84,8 @@ def divide_document(document, max_length):
84
  return [document[i:i+max_length] for i in range(0, len(document), max_length)]
85
 
86
  def get_table_download_link(file_path):
87
- with open(file_path, 'r') as file:
 
88
  data = file.read()
89
  b64 = base64.b64encode(data.encode()).decode()
90
  file_name = os.path.basename(file_path)
 
84
  return [document[i:i+max_length] for i in range(0, len(document), max_length)]
85
 
86
  def get_table_download_link(file_path):
87
+ #with open(file_path, 'r') as file:
88
+ with open(file_path, 'rb') as file:
89
  data = file.read()
90
  b64 = base64.b64encode(data.encode()).decode()
91
  file_name = os.path.basename(file_path)