Spaces:
Running
Running
| """Configuration constants and settings for the FORTIFIED Marketing Copilot.""" | |
| import os | |
| from pathlib import Path | |
| from typing import Dict, List | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| # Paths | |
| BASE_DIR = Path(__file__).resolve().parent | |
| VECTOR_DIR = BASE_DIR / "vectorstore" / "chroma" | |
| CATALOG_PATH = BASE_DIR / "vectorstore" / "state_catalog.json" | |
| QUESTIONS_PATH = BASE_DIR / "questions_choices.json" | |
| # Environment variables | |
| COLLECTION_NAME = os.getenv("CHROMA_COLLECTION") | |
| DEFAULT_MODEL = os.getenv("LLM_MODEL") | |
| EMBEDDING_MODEL = os.getenv("EMBEDDING_MODEL", "text-embedding-3-large") | |
| TAVILY_API_KEY = os.getenv("TAVILY_API_KEY") | |
| # Task groups configuration | |
| TASK_GROUPS: Dict[str, List[str]] = { | |
| "Strategic Marketing Questions": [ | |
| "Market & Audience", | |
| "Marketing Strategy", | |
| ], | |
| "Content Marketing Tasks": [ | |
| "Content Creation", | |
| "Content Planning", | |
| ], | |
| "Social Media Marketing Tasks": [ | |
| "Social Media Content", | |
| "Social Strategy", | |
| ], | |
| "Email Marketing Tasks": [ | |
| "Campaign Creation", | |
| "Email Strategy", | |
| "Email Automation", | |
| ], | |
| "Branding & Messaging": [ | |
| "Generate brand voice guidelines", | |
| "Create slogans", | |
| "Create value propositions", | |
| ], | |
| "SEO (Search Engine Optimization) Questions": [ | |
| "Keyword Research and Content SEO", | |
| ], | |
| } | |
| # Trusted domains for web search | |
| TRUSTED_DOMAINS = { | |
| "ibhs.org", | |
| "fortifiedhome.org", | |
| "fema.gov", | |
| "noaa.gov", | |
| "weather.gov", | |
| "nws.noaa.gov", | |
| "naic.org", | |
| "louisiana.gov", | |
| "ldi.la.gov", | |
| "usa.gov", | |
| "energy.gov", | |
| "hud.gov", | |
| "nola.gov", | |
| "lsu.edu", | |
| } | |
| # Custom CSS | |
| CUSTOM_CSS = """ | |
| @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Source+Sans+3:wght@400;600;700&display=swap'); | |
| :root { | |
| --brand-ink: #102326; | |
| --brand-primary: #0b5e59; | |
| --brand-accent: #f59e0b; | |
| --surface-soft: #f6fbfb; | |
| } | |
| .gradio-container { | |
| font-family: 'Source Sans 3', sans-serif; | |
| background: | |
| radial-gradient(1200px 400px at 5% -5%, rgba(11, 94, 89, 0.18), transparent 60%), | |
| radial-gradient(1200px 400px at 95% -10%, rgba(245, 158, 11, 0.18), transparent 55%), | |
| linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%); | |
| } | |
| #hero { | |
| border: 1px solid rgba(16, 35, 38, 0.12); | |
| border-radius: 18px; | |
| padding: 20px 22px; | |
| background: linear-gradient(120deg, rgba(11, 94, 89, 0.08), rgba(245, 158, 11, 0.1)); | |
| margin-bottom: 10px; | |
| } | |
| #hero h1 { | |
| margin: 0; | |
| color: var(--brand-ink); | |
| font-family: 'Space Grotesk', sans-serif; | |
| font-size: 1.7rem; | |
| } | |
| #hero p { | |
| margin: 8px 0 0; | |
| color: #27434a; | |
| font-size: 1rem; | |
| } | |
| .card { | |
| border-radius: 16px; | |
| border: 1px solid rgba(16, 35, 38, 0.14); | |
| background: rgba(255, 255, 255, 0.92); | |
| } | |
| #related-charts-gallery figcaption, | |
| #related-charts-gallery .caption, | |
| #related-charts-gallery [class*="caption"] { | |
| white-space: normal !important; | |
| overflow-wrap: anywhere; | |
| word-break: break-word; | |
| line-height: 1.25; | |
| } | |
| """ | |