Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -138,9 +138,7 @@ def create_border_decoration(qr_image, decoration_style="Flowers"):
|
|
138 |
|
139 |
return decorated_image
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
def create_qr(content, qr_type, fill_color, back_color, box_size, border_size, error_correction, border_decoration="🌸 Cherry Blossoms"):
|
144 |
# QR 코드 데이터 포맷팅
|
145 |
formatted_data = format_data(content, qr_type)
|
146 |
|
@@ -166,10 +164,9 @@ def create_qr(content, qr_type, fill_color, back_color, box_size, border_size, e
|
|
166 |
# QR 이미지 생성
|
167 |
qr_img = qr.make_image(fill_color=fill_color, back_color=back_color)
|
168 |
|
169 |
-
# Add border decoration if specified
|
170 |
-
if border_decoration
|
171 |
-
|
172 |
-
qr_img = create_border_decoration(qr_img, emoji)
|
173 |
|
174 |
# 파일 저장
|
175 |
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
@@ -328,7 +325,7 @@ def create_interface():
|
|
328 |
"Diamonds", # 다이아몬드 패턴
|
329 |
"Lace" # 레이스 패턴
|
330 |
],
|
331 |
-
value="
|
332 |
label="Border Decoration Style"
|
333 |
)
|
334 |
|
|
|
138 |
|
139 |
return decorated_image
|
140 |
|
141 |
+
def create_qr(content, qr_type, fill_color, back_color, box_size, border_size, error_correction, border_decoration="None"):
|
|
|
|
|
142 |
# QR 코드 데이터 포맷팅
|
143 |
formatted_data = format_data(content, qr_type)
|
144 |
|
|
|
164 |
# QR 이미지 생성
|
165 |
qr_img = qr.make_image(fill_color=fill_color, back_color=back_color)
|
166 |
|
167 |
+
# Add border decoration if specified and not None
|
168 |
+
if border_decoration and border_decoration != "None":
|
169 |
+
qr_img = create_border_decoration(qr_img, border_decoration)
|
|
|
170 |
|
171 |
# 파일 저장
|
172 |
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
|
|
325 |
"Diamonds", # 다이아몬드 패턴
|
326 |
"Lace" # 레이스 패턴
|
327 |
],
|
328 |
+
value="None",
|
329 |
label="Border Decoration Style"
|
330 |
)
|
331 |
|