Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,7 +69,10 @@ def generate_pdf(itinerary_text, location="Destination", days=5):
|
|
| 69 |
file_path = os.path.join(tempfile.gettempdir(), filename)
|
| 70 |
|
| 71 |
# Prepare the document template with letter page size
|
| 72 |
-
doc = SimpleDocTemplate(file_path, pagesize=letter,
|
|
|
|
|
|
|
|
|
|
| 73 |
# Get default stylesheet and customize the Normal style
|
| 74 |
styles = getSampleStyleSheet()
|
| 75 |
style = styles["Normal"]
|
|
@@ -96,6 +99,7 @@ def generate_pdf(itinerary_text, location="Destination", days=5):
|
|
| 96 |
|
| 97 |
return file_path
|
| 98 |
|
|
|
|
| 99 |
with gr.Blocks(theme=gr.themes.Default(primary_hue="teal", secondary_hue="teal")) as demo:
|
| 100 |
# Header with gr.HTML for styles and animation
|
| 101 |
header_html = """
|
|
|
|
| 69 |
file_path = os.path.join(tempfile.gettempdir(), filename)
|
| 70 |
|
| 71 |
# Prepare the document template with letter page size
|
| 72 |
+
doc = SimpleDocTemplate(file_path, pagesize=letter,
|
| 73 |
+
rightMargin=40, leftMargin=40,
|
| 74 |
+
topMargin=40, bottomMargin=40)
|
| 75 |
+
|
| 76 |
# Get default stylesheet and customize the Normal style
|
| 77 |
styles = getSampleStyleSheet()
|
| 78 |
style = styles["Normal"]
|
|
|
|
| 99 |
|
| 100 |
return file_path
|
| 101 |
|
| 102 |
+
|
| 103 |
with gr.Blocks(theme=gr.themes.Default(primary_hue="teal", secondary_hue="teal")) as demo:
|
| 104 |
# Header with gr.HTML for styles and animation
|
| 105 |
header_html = """
|