awacke1 commited on
Commit
40987ec
·
verified ·
1 Parent(s): 71dba04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -676,9 +676,7 @@ def generate_filename(prompt, file_type):
676
  return f"{safe_date_time}_{safe_prompt}.{file_type}"
677
 
678
  # Function to create and save a file (and avoid the black hole of lost data 🕳)
679
- def create_file(filename, prompt, response, should_save=True):
680
- if not should_save:
681
- return
682
  with open(filename, 'w', encoding='utf-8') as file:
683
  file.write(prompt + "\n\n" + response)
684
 
@@ -726,7 +724,7 @@ def perform_ai_lookup(query):
726
 
727
 
728
  filename = generate_filename(query, "md")
729
- create_file(filename, query, results, should_save)
730
  return results
731
 
732
  def display_file_content(file_path):
 
676
  return f"{safe_date_time}_{safe_prompt}.{file_type}"
677
 
678
  # Function to create and save a file (and avoid the black hole of lost data 🕳)
679
+ def create_file(filename, prompt, response):
 
 
680
  with open(filename, 'w', encoding='utf-8') as file:
681
  file.write(prompt + "\n\n" + response)
682
 
 
724
 
725
 
726
  filename = generate_filename(query, "md")
727
+ create_file(filename, query, results)
728
  return results
729
 
730
  def display_file_content(file_path):