Spaces:
Sleeping
Sleeping
Update app_logic.py
Browse files- 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 |
-
|
| 34 |
-
|
| 35 |
|
| 36 |
try:
|
| 37 |
logger.info("Starting extraction of markdown from image...")
|
| 38 |
-
result = keylock_core.extract_repo_from_image(repo_image,
|
| 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."
|