File size: 3,482 Bytes
f89ae58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0afe5c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f89ae58
0afe5c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f89ae58
 
0afe5c5
f89ae58
0afe5c5
f89ae58
 
 
 
0afe5c5
 
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import streamlit as st
import time
from PIL import Image

st.markdown("""
<style>
[data-testid="stSidebar"] {
    display: none;
}
[data-testid="collapsedControl"] {
    display: none;
}
</style>
""", unsafe_allow_html=True)



#μˆ˜μ • μš”μ²­ 반영
def show_loading():
    st.set_page_config(
    page_title=" ",
   
    layout="centered"
)

def show_loading():
    st.markdown("""
    <style>
    @import url('https://fonts.googleapis.com/css2?family=Black+Han+Sans&family=Noto+Sans+KR:wght@400;700&display=swap');
    .stApp { 
        font-family: 'Noto Sans KR', sans-serif; 
    }
    .screen-wrap {
        margin-top: 90px;
    }
    .loader {
        width: 56px;
        height: 56px;
        border: 7px solid #e0e0e0;
        border-top: 7px solid #111;
        border-radius: 50%;
        animation: spin 1.1s linear infinite;
    }
    @keyframes spin { 
        to { transform: rotate(360deg); } 
    }
    .film-card {
        background: white;
        border: 3px solid #111;
        border-radius: 18px;
        padding: 60px 44px;
        box-shadow: 6px 6px 0px #111;
        position: relative;
        overflow: hidden;
        width: 380px;
        min-height: 300px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        box-sizing: border-box;
    }
    .holes {
        position: absolute;
        top: 0; 
        bottom: 0;
        width: 24px;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        padding: 16px 0;
    }
    .holes.left  { left: 0; }
    .holes.right { right: 0; }
    .hole { 
        width: 12px; 
        height: 12px; 
        background: #111; 
        border-radius: 2px; 
    }
    .status-text {
        font-size: 1.15rem;
        font-weight: 700;
        color: #111;
        text-align: center;
        line-height: 1.5;
        word-break: keep-all;
    }
    .progress-wrap {
        width: 100%;
        background: #e0e0e0;
        border-radius: 99px;
        height: 12px;
        overflow: hidden;
    }
    .progress-fill {
        height: 100%;
        background: #111;
        border-radius: 99px;
        transition: width 0.3s ease;
    }
    .progress-text {
        font-size: 0.85rem;
        color: #666;
        text-align: center;
    }
    </style>
    """, unsafe_allow_html=True)

    HOLES = '<div class="hole"></div>' * 9
    FILM_SIDES = f'<div class="holes left">{HOLES}</div><div class="holes right">{HOLES}</div>'

    STEPS = [
        ("μžλ§‰μ„ μ˜μƒμ— μž…νžˆλŠ” μ€‘μ΄μ—μš”", 1.5)
    ]

    card = st.empty()

    for i, (label, delay) in enumerate(STEPS):
        pct = (i + 1) / len(STEPS)
        pct_int = int(pct * 100)

        card.markdown(f"""
        <div class="screen-wrap">
            <div class="film-card">
                {FILM_SIDES}
                <div class="loader"></div>
                <div class="status-text">AIκ°€ 감정을 λΆ„μ„ν•˜κ³  μžλ§‰μ„ μƒμ„±ν•˜λŠ” μ€‘μ΄μ—μš”</div>
                <div class="progress-wrap">
                    <div class="progress-fill" style="width:{pct_int}%"></div>
                </div>
                <div class="progress-text">{label} ... {pct_int}%</div>
            </div>
        </div>
        """, unsafe_allow_html=True)

        time.sleep(delay)




    #ν™”λ©΄ μ „ν™˜ μ½”λ“œ μΆ”κ°€
    st.switch_page("pages/edit.py")