Spaces:
Sleeping
Sleeping
Update app.py
Browse files58 unmodified lines5960616263646566676869707158 unmodified linesimage_path = MOOD_IMAGES.get(mood, MOOD_IMAGES["Any"])return itinerary_text, image_path, gr.update(visible=True)def generate_pdf(itinerary_text, location="Destination", days=5):if not itinerary_text.strip():return None# Create a nice filenamesafe_location = re.sub(r'[^A-Za-z0-9]+', '_', location.strip())filename = f"itinerary_{safe_location}_{days}_days.pdf"file_path = os.path.join(tempfile.gettempdir(), filename)# Prepare the document template with letter page size58 unmodified lines596061626364656667686958 unmodified linesimage_path = MOOD_IMAGES.get(mood, MOOD_IMAGES["Any"])return itinerary_text, image_path, gr.update(visible=True)def generate_pdf(itinerary_text):if not itinerary_text.strip():return None# Use a static friendly name (e.g., "feelaway_itinerary.pdf")filename = "feelaway_itinerary.pdf"file_path = os.path.join(tempfile.gettempdir(), filename)# Prepare the document template with letter page size
app.py+3-5