File size: 2,556 Bytes
cfb3303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

"""
Configuration settings for the Text-to-Infographics Generator
"""
import os
from typing import Dict, List, Tuple

class Config:
    """Application configuration"""
    
    # API Keys (set in Hugging Face Spaces secrets)
    GEMINI_API_KEY = os.getenv("GEMINI_API_KEY", "")
    
    # Application settings
    APP_TITLE = "AI Text-to-Infographics Generator"
    APP_DESCRIPTION = "Transform your text into beautiful infographics with AI"
    
    # Processing limits
    MAX_TEXT_LENGTH = 15000
    MIN_TEXT_LENGTH = 50
    MAX_SECTIONS = 10
    
    # Image settings
    DEFAULT_WIDTH = 1080
    DEFAULT_HEIGHT = 1920
    DPI = 300
    QUALITY = 95
    
    # Supported formats
    SUPPORTED_FORMATS = ["PNG", "PDF", "SVG"]
    
    # Templates
    TEMPLATES = [
        "Modern",
        "Corporate", 
        "Creative",
        "Minimalist",
        "Academic"
    ]
    
    # Layout options
    LAYOUTS = [
        "Vertical",
        "Horizontal", 
        "Grid",
        "Flow"
    ]
    
    # Color palettes
    COLOR_PALETTES = {
        "Blue": "#3498db",
        "Green": "#2ecc71", 
        "Purple": "#9b59b6",
        "Orange": "#e67e22",
        "Red": "#e74c3c",
        "Teal": "#1abc9c",
        "Dark": "#2c3e50",
        "Pink": "#fd79a8"
    }
    
    # Font settings
    DEFAULT_FONTS = {
        "title": ("Arial", 24, "bold"),
        "heading": ("Arial", 18, "bold"),
        "body": ("Arial", 14, "normal"),
        "caption": ("Arial", 12, "normal")
    }
    
    # Gemini settings
    GEMINI_MODEL = "gemini-1.5-flash"
    GEMINI_TEMPERATURE = 0.3
    GEMINI_MAX_TOKENS = 2048

# Color schemes for different templates
TEMPLATE_COLORS = {
    "Modern": {
        "primary": "#3498db",
        "secondary": "#2ecc71", 
        "accent": "#f39c12",
        "background": "#ecf0f1",
        "text": "#2c3e50"
    },
    "Corporate": {
        "primary": "#2c3e50",
        "secondary": "#34495e",
        "accent": "#3498db", 
        "background": "#ffffff",
        "text": "#2c3e50"
    },
    "Creative": {
        "primary": "#9b59b6",
        "secondary": "#e91e63",
        "accent": "#f39c12",
        "background": "#fdf2e9", 
        "text": "#2c3e50"
    },
    "Minimalist": {
        "primary": "#2c3e50",
        "secondary": "#95a5a6",
        "accent": "#3498db",
        "background": "#ffffff",
        "text": "#2c3e50"
    },
    "Academic": {
        "primary": "#34495e", 
        "secondary": "#7f8c8d",
        "accent": "#2980b9",
        "background": "#f8f9fa",
        "text": "#2c3e50"
    }
}