neuralworm commited on
Commit
6dbcc77
·
1 Parent(s): 702dd9c

beautify results

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -68,7 +68,7 @@ def insert_phrase_to_db(gematria_sum, phrase_candidate, book, chapter, verse):
68
  except sqlite3.IntegrityError:
69
  logging.debug(f"Phrase already exists: {phrase_candidate} (Gematria: {gematria_sum}) at {book}:{chapter}:{verse}")
70
 
71
- def populate_database(tanach_texts, max_phrase_length=3):
72
  """Populates the database with phrases from the Tanach and their Gematria values."""
73
  global conn, book_names
74
  logging.info("Populating database...")
@@ -241,10 +241,10 @@ def run_app():
241
  initialize_translator()
242
 
243
  # Pre-populate the database
244
- tanach_texts = process_json_files(1, 1) # Process all books
245
- populate_database(tanach_texts, max_phrase_length=4)
246
- tanach_texts = process_json_files(27, 27) # Process all books
247
- populate_database(tanach_texts, max_phrase_length=4)
248
 
249
  iface = gr.Interface(
250
  fn=gematria_search_interface,
 
68
  except sqlite3.IntegrityError:
69
  logging.debug(f"Phrase already exists: {phrase_candidate} (Gematria: {gematria_sum}) at {book}:{chapter}:{verse}")
70
 
71
+ def populate_database(tanach_texts, max_phrase_length=1):
72
  """Populates the database with phrases from the Tanach and their Gematria values."""
73
  global conn, book_names
74
  logging.info("Populating database...")
 
241
  initialize_translator()
242
 
243
  # Pre-populate the database
244
+ tanach_texts = process_json_files(1, 39) # Process all books
245
+ populate_database(tanach_texts, max_phrase_length=2)
246
+ #tanach_texts = process_json_files(27, 27) # Process all books
247
+ #populate_database(tanach_texts, max_phrase_length=4)
248
 
249
  iface = gr.Interface(
250
  fn=gematria_search_interface,