Update app.py
Browse files
app.py
CHANGED
@@ -152,7 +152,10 @@ def initialize_database(list_file_obj, chunk_size, chunk_overlap, progress=gr.Pr
|
|
152 |
collection_name = Path(list_file_path[0]).stem
|
153 |
# Fix potential issues from naming convention
|
154 |
## Remove space
|
155 |
-
collection_name = collection_name.replace(" ","-")
|
|
|
|
|
|
|
156 |
## Limit lenght to 50 characters
|
157 |
collection_name = collection_name[:50]
|
158 |
## Enforce start and end as alphanumeric character
|
|
|
152 |
collection_name = Path(list_file_path[0]).stem
|
153 |
# Fix potential issues from naming convention
|
154 |
## Remove space
|
155 |
+
collection_name = collection_name.replace(" ","-")
|
156 |
+
# Remove periods
|
157 |
+
collection_name = collection_name.replace(".","_")
|
158 |
+
|
159 |
## Limit lenght to 50 characters
|
160 |
collection_name = collection_name[:50]
|
161 |
## Enforce start and end as alphanumeric character
|