broadfield-dev commited on
Commit
8563cae
·
verified ·
1 Parent(s): dc41d36

Update app_logic.py

Browse files
Files changed (1) hide show
  1. app_logic.py +3 -3
app_logic.py CHANGED
@@ -30,12 +30,12 @@ def extract_markdown_from_image(repo_image: Image.Image, image_password: str):
30
  """
31
  if not repo_image:
32
  return None, "Error: Please upload a repository image."
33
- if not image_password:
34
- return None, "Error: Please provide the password for the image."
35
 
36
  try:
37
  logger.info("Starting extraction of markdown from image...")
38
- result = keylock_core.extract_repo_from_image(repo_image, image_password)
39
  markdown_content = result.get('markdown')
40
  if not markdown_content:
41
  return None, "Error: Extraction succeeded, but no markdown content was found in the image."
 
30
  """
31
  if not repo_image:
32
  return None, "Error: Please upload a repository image."
33
+
34
+ password_to_use = image_password if image_password is not None else ""
35
 
36
  try:
37
  logger.info("Starting extraction of markdown from image...")
38
+ result = keylock_core.extract_repo_from_image(repo_image, password_to_use)
39
  markdown_content = result.get('markdown')
40
  if not markdown_content:
41
  return None, "Error: Extraction succeeded, but no markdown content was found in the image."