Spaces:
Sleeping
Sleeping
bartman081523
commited on
Commit
•
1b9162a
1
Parent(s):
026ec47
populate db
Browse files
app.py
CHANGED
@@ -298,7 +298,7 @@ def run_app():
|
|
298 |
# Pre-populate the database
|
299 |
logging.info("Starting database population...")
|
300 |
phrases_to_insert = [] # Collect phrases before inserting in bulk
|
301 |
-
for max_phrase_length in range(1,
|
302 |
for gematria_sum, phrase, book, chapter, verse in tqdm(populate_database(1, 39, max_phrase_length=max_phrase_length), desc=f"Populating Database (Max Length: {max_phrase_length})"): # Books 1 to 39
|
303 |
phrases_to_insert.append((gematria_sum, phrase, book, chapter, verse))
|
304 |
if len(phrases_to_insert) >= 1000: # Insert in batches of 1000 for efficiency
|
|
|
298 |
# Pre-populate the database
|
299 |
logging.info("Starting database population...")
|
300 |
phrases_to_insert = [] # Collect phrases before inserting in bulk
|
301 |
+
for max_phrase_length in range(1, 5): # Populate for phrases up to 5 words
|
302 |
for gematria_sum, phrase, book, chapter, verse in tqdm(populate_database(1, 39, max_phrase_length=max_phrase_length), desc=f"Populating Database (Max Length: {max_phrase_length})"): # Books 1 to 39
|
303 |
phrases_to_insert.append((gematria_sum, phrase, book, chapter, verse))
|
304 |
if len(phrases_to_insert) >= 1000: # Insert in batches of 1000 for efficiency
|