rongo1
commited on
Commit
·
c288165
1
Parent(s):
58ed944
fix: fixed not saving
Browse files
app.py
CHANGED
@@ -37,8 +37,9 @@ logger.info("Gemini API configured successfully")
|
|
37 |
|
38 |
# Create output directories
|
39 |
logger.info("Setting up output directories")
|
40 |
-
|
41 |
-
|
|
|
42 |
output_dir.mkdir(exist_ok=True)
|
43 |
images_dir.mkdir(exist_ok=True)
|
44 |
logger.info(f"Export directory created/verified: {output_dir}")
|
@@ -584,4 +585,4 @@ with gr.Blocks(title="Business Card Data Extractor") as demo:
|
|
584 |
|
585 |
# Launch for Hugging Face Spaces deployment
|
586 |
logger.info("Starting Gradio demo")
|
587 |
-
demo.launch()
|
|
|
37 |
|
38 |
# Create output directories
|
39 |
logger.info("Setting up output directories")
|
40 |
+
# Use absolute paths to avoid ambiguity in different environments
|
41 |
+
output_dir = Path("business_card_exports").resolve()
|
42 |
+
images_dir = Path("business_cards").resolve()
|
43 |
output_dir.mkdir(exist_ok=True)
|
44 |
images_dir.mkdir(exist_ok=True)
|
45 |
logger.info(f"Export directory created/verified: {output_dir}")
|
|
|
585 |
|
586 |
# Launch for Hugging Face Spaces deployment
|
587 |
logger.info("Starting Gradio demo")
|
588 |
+
demo.launch(share=True)
|