Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,13 +65,14 @@ def generate_pdf_endpoint():
|
|
| 65 |
|
| 66 |
analysis = data["analysis"]
|
| 67 |
user_info = {
|
| 68 |
-
"name": data
|
| 69 |
-
"age": data
|
| 70 |
-
"gender": data
|
| 71 |
-
"email": data
|
| 72 |
-
"phone": data
|
| 73 |
}
|
| 74 |
|
|
|
|
| 75 |
# Generate HTML + PDF
|
| 76 |
html_path = os.path.abspath(f"report_{uuid.uuid4().hex}.html")
|
| 77 |
pdf_path = os.path.abspath(f"report_{uuid.uuid4().hex}.pdf")
|
|
|
|
| 65 |
|
| 66 |
analysis = data["analysis"]
|
| 67 |
user_info = {
|
| 68 |
+
"name": data.get("name", ""),
|
| 69 |
+
"age": data.get("age", ""),
|
| 70 |
+
"gender": data.get("gender", ""),
|
| 71 |
+
"email": data.get("email", ""),
|
| 72 |
+
"phone": data.get("phone", "")
|
| 73 |
}
|
| 74 |
|
| 75 |
+
|
| 76 |
# Generate HTML + PDF
|
| 77 |
html_path = os.path.abspath(f"report_{uuid.uuid4().hex}.html")
|
| 78 |
pdf_path = os.path.abspath(f"report_{uuid.uuid4().hex}.pdf")
|