Spaces:
Sleeping
Sleeping
Update app.py
Browse files106 unmodified lines10710810911011111211318 unmodified lines13213313413513613713840 unmodified lines179180181182183184185186187188106 unmodified linesitinerary_text = completion.choices[0].message.content# 🌤️ Get general season/weather infoseason_text = get_best_season(location_text)# 📍 Map and image18 unmodified linesdef get_best_season(location):"""AI-powered function to recommend the best season or general weather for any location."""if not location.strip() or location.lower() == "any destination":return "🌤️ Best season info is available for specific locations only."prompt = (f"Suggest the best season or time of year to visit {location} based on weather and tourism. "40 unmodified linesdoc = SimpleDocTemplate(temp_path, pagesize=letter,rightMargin=40, leftMargin=40,topMargin=40, bottomMargin=40)styles = getSampleStyleSheet()style = styles["Normal"]style.fontName = "Times-Roman"style.fontSize = 13style.leading = 18106 unmodified lines10710810911011111211318 unmodified lines13213313413513613713840 unmodified lines179180181182183184185186187188189106 unmodified linesitinerary_text = completion.choices[0].message.content# Get general season/weather infoseason_text = get_best_season(location_text)# 📍 Map and image18 unmodified linesdef get_best_season(location):"""AI-powered function to recommend the best season or general weather for any location."""if not location.strip() or location.lower() == "any destination":return " Best season info is available for specific locations only."prompt = (f"Suggest the best season or time of year to visit {location} based on weather and tourism. "40 unmodified linesdoc = SimpleDocTemplate(temp_path, pagesize=letter,rightMargin=40, leftMargin=40,topMargin=40, bottomMargin=40)pdfmetrics.registerFont(TTFont('DejaVu', '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf'))styles = getSampleStyleSheet()style = styles["Normal"]style.fontName = "DejaVu"style.fontSize = 13style.leading = 18
app.py+4-3