File size: 1,945 Bytes
0362b52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st

def get_config():
    """Get configuration from sidebar."""
    config = {
        "create_packshot": False,
        "add_shadow": False,
        "lifestyle_shot": False,
        "background_color": "#FFFFFF",
        "shadow_type": "natural",
        "scene_description": "",
        "num_results": 1,
        "aspect_ratio": "1:1",
        "sync": True
    }
    
    st.sidebar.header("Configuration")
    
    # Image Generation Settings
    st.sidebar.subheader("Image Generation")
    config["num_results"] = st.sidebar.slider("Number of Results", 1, 4, 1)
    config["aspect_ratio"] = st.sidebar.selectbox(
        "Aspect Ratio",
        ["1:1", "16:9", "9:16", "4:3", "3:4"]
    )
    config["sync"] = st.sidebar.checkbox("Wait for Results", True)
    
    # Packshot Settings
    st.sidebar.subheader("Packshot")
    config["create_packshot"] = st.sidebar.checkbox(
        "Create Packshot",
        help="Create a professional product packshot"
    )
    if config["create_packshot"]:
        config["background_color"] = st.sidebar.color_picker(
            "Background Color",
            "#FFFFFF"
        )
    
    # Shadow Settings
    st.sidebar.subheader("Shadow")
    config["add_shadow"] = st.sidebar.checkbox(
        "Add Shadow",
        help="Add shadow to the product image"
    )
    if config["add_shadow"]:
        config["shadow_type"] = st.sidebar.selectbox(
            "Shadow Type",
            ["Natural", "Drop"]
        ).lower()
    
    # Lifestyle Shot Settings
    st.sidebar.subheader("Lifestyle Shot")
    config["lifestyle_shot"] = st.sidebar.checkbox(
        "Create Lifestyle Shot",
        help="Generate lifestyle context for the product"
    )
    if config["lifestyle_shot"]:
        config["scene_description"] = st.sidebar.text_area(
            "Scene Description",
            help="Describe the environment for the lifestyle shot"
        )
    
    return config