Spaces:
Building
on
CPU Upgrade
Building
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -115,39 +115,50 @@ def get_card(item: dict, index: int, card_type: str = "space") -> str:
|
|
115 |
gpu_memory = gpu_info.get('memory', 'N/A')
|
116 |
gpu_info = f"{gpu_type} ({gpu_memory}GB)"
|
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 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
|
153 |
# 하드웨어 정보 HTML (모든 카드 타입에 대해 동일하게 적용)
|
|
|
115 |
gpu_memory = gpu_info.get('memory', 'N/A')
|
116 |
gpu_info = f"{gpu_type} ({gpu_memory}GB)"
|
117 |
|
118 |
+
# 카드 타입별 그라데이션 설정
|
119 |
+
if card_type == "space":
|
120 |
+
gradient_colors = """
|
121 |
+
rgba(255, 182, 193, 0.7), /* 파스텔 핑크 */
|
122 |
+
rgba(173, 216, 230, 0.7), /* 파스텔 블루 */
|
123 |
+
rgba(255, 218, 185, 0.7) /* 파스텔 피치 */
|
124 |
+
"""
|
125 |
+
bg_content = f"""
|
126 |
+
background-image: url(data:image/png;base64,{get_cached_screenshot(url) if get_cached_screenshot(url) else ''});
|
127 |
+
background-size: cover;
|
128 |
+
background-position: center;
|
129 |
+
"""
|
130 |
+
content_bg = f"""
|
131 |
+
background: linear-gradient(135deg, {gradient_colors});
|
132 |
+
backdrop-filter: blur(10px);
|
133 |
+
"""
|
134 |
+
elif card_type == "model":
|
135 |
+
gradient_colors = """
|
136 |
+
rgba(110, 142, 251, 0.7), /* 모델 블루 */
|
137 |
+
rgba(130, 158, 251, 0.7),
|
138 |
+
rgba(150, 174, 251, 0.7)
|
139 |
+
"""
|
140 |
+
bg_content = f"""
|
141 |
+
background: linear-gradient(135deg, #6e8efb, #4a6cf7);
|
142 |
+
padding: 15px;
|
143 |
+
"""
|
144 |
+
content_bg = f"""
|
145 |
+
background: linear-gradient(135deg, {gradient_colors});
|
146 |
+
backdrop-filter: blur(10px);
|
147 |
+
"""
|
148 |
+
else: # dataset
|
149 |
+
gradient_colors = """
|
150 |
+
rgba(255, 107, 107, 0.7), /* 데이터셋 레드 */
|
151 |
+
rgba(255, 127, 127, 0.7),
|
152 |
+
rgba(255, 147, 147, 0.7)
|
153 |
+
"""
|
154 |
+
bg_content = f"""
|
155 |
+
background: linear-gradient(135deg, #ff6b6b, #ff8787);
|
156 |
+
padding: 15px;
|
157 |
+
"""
|
158 |
+
content_bg = f"""
|
159 |
+
background: linear-gradient(135deg, {gradient_colors});
|
160 |
+
backdrop-filter: blur(10px);
|
161 |
+
"""
|
162 |
|
163 |
|
164 |
# 하드웨어 정보 HTML (모든 카드 타입에 대해 동일하게 적용)
|