Spaces:
Sleeping
Sleeping
Upload simple_app.py
Browse files- simple_app.py +6 -6
simple_app.py
CHANGED
@@ -10,6 +10,10 @@ import time
|
|
10 |
import uuid
|
11 |
from datetime import datetime
|
12 |
|
|
|
|
|
|
|
|
|
13 |
# Try to import ReportLab (needed for PDF generation)
|
14 |
try:
|
15 |
from reportlab.lib.pagesizes import letter
|
@@ -21,10 +25,6 @@ except ImportError:
|
|
21 |
logger.warning("ReportLab library not available - PDF export will be disabled")
|
22 |
REPORTLAB_AVAILABLE = False
|
23 |
|
24 |
-
# Configure logging
|
25 |
-
logging.basicConfig(level=logging.INFO)
|
26 |
-
logger = logging.getLogger(__name__)
|
27 |
-
|
28 |
# AWS credentials for Bedrock API
|
29 |
AWS_ACCESS_KEY = os.getenv("AWS_ACCESS_KEY", "")
|
30 |
AWS_SECRET_KEY = os.getenv("AWS_SECRET_KEY", "")
|
@@ -1187,9 +1187,9 @@ def create_requirements_file():
|
|
1187 |
"pandas",
|
1188 |
"numpy",
|
1189 |
"Pillow",
|
1190 |
-
"reportlab>=3.6.0", # Required for PDF exports
|
1191 |
"boto3>=1.28.0", # Required for AWS services
|
1192 |
-
"botocore>=1.31.0"
|
|
|
1193 |
]
|
1194 |
|
1195 |
with open("requirements.txt", "w") as f:
|
|
|
10 |
import uuid
|
11 |
from datetime import datetime
|
12 |
|
13 |
+
# Configure logging
|
14 |
+
logging.basicConfig(level=logging.INFO)
|
15 |
+
logger = logging.getLogger(__name__)
|
16 |
+
|
17 |
# Try to import ReportLab (needed for PDF generation)
|
18 |
try:
|
19 |
from reportlab.lib.pagesizes import letter
|
|
|
25 |
logger.warning("ReportLab library not available - PDF export will be disabled")
|
26 |
REPORTLAB_AVAILABLE = False
|
27 |
|
|
|
|
|
|
|
|
|
28 |
# AWS credentials for Bedrock API
|
29 |
AWS_ACCESS_KEY = os.getenv("AWS_ACCESS_KEY", "")
|
30 |
AWS_SECRET_KEY = os.getenv("AWS_SECRET_KEY", "")
|
|
|
1187 |
"pandas",
|
1188 |
"numpy",
|
1189 |
"Pillow",
|
|
|
1190 |
"boto3>=1.28.0", # Required for AWS services
|
1191 |
+
"botocore>=1.31.0", # Required for AWS services
|
1192 |
+
"reportlab>=3.6.0" # Optional for PDF exports
|
1193 |
]
|
1194 |
|
1195 |
with open("requirements.txt", "w") as f:
|