Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|