Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -451,12 +451,17 @@ def load_session_history(selected_session=None):
|
|
| 451 |
transform: translateY(-2px);
|
| 452 |
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
|
| 453 |
}
|
| 454 |
-
.card-image {
|
| 455 |
width: 100%;
|
| 456 |
height: 200px;
|
| 457 |
-
|
|
|
|
|
|
|
|
|
|
| 458 |
border-radius: 4px;
|
| 459 |
margin-bottom: 10px;
|
|
|
|
|
|
|
| 460 |
}
|
| 461 |
.card-name {
|
| 462 |
font-weight: bold;
|
|
@@ -480,17 +485,10 @@ def load_session_history(selected_session=None):
|
|
| 480 |
image_path = item.get('image_url', '')
|
| 481 |
prompt = html.escape(item.get('prompt', ''))
|
| 482 |
|
| 483 |
-
#
|
| 484 |
-
try:
|
| 485 |
-
image_data = get_image_base64(image_path)
|
| 486 |
-
image_url = f"data:image/png;base64,{image_data}"
|
| 487 |
-
except Exception as e:
|
| 488 |
-
print(f"Error loading image {image_path}: {e}")
|
| 489 |
-
image_url = "data:image/png;base64," + get_image_base64('default.png') # 기본 이미지
|
| 490 |
-
|
| 491 |
html_content += f"""
|
| 492 |
<div class="prompt-card" data-prompt="{prompt}" onclick="handleCardClick(this)">
|
| 493 |
-
<
|
| 494 |
<div class="card-name">{name}</div>
|
| 495 |
<div class="card-prompt">{prompt}</div>
|
| 496 |
</div>
|
|
|
|
| 451 |
transform: translateY(-2px);
|
| 452 |
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
|
| 453 |
}
|
| 454 |
+
.card-image-placeholder {
|
| 455 |
width: 100%;
|
| 456 |
height: 200px;
|
| 457 |
+
background-color: #f5f5f5;
|
| 458 |
+
display: flex;
|
| 459 |
+
align-items: center;
|
| 460 |
+
justify-content: center;
|
| 461 |
border-radius: 4px;
|
| 462 |
margin-bottom: 10px;
|
| 463 |
+
color: #999;
|
| 464 |
+
font-size: 14px;
|
| 465 |
}
|
| 466 |
.card-name {
|
| 467 |
font-weight: bold;
|
|
|
|
| 485 |
image_path = item.get('image_url', '')
|
| 486 |
prompt = html.escape(item.get('prompt', ''))
|
| 487 |
|
| 488 |
+
# 이미지 대신 플레이스홀더 사용
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 489 |
html_content += f"""
|
| 490 |
<div class="prompt-card" data-prompt="{prompt}" onclick="handleCardClick(this)">
|
| 491 |
+
<div class="card-image-placeholder">No Image</div>
|
| 492 |
<div class="card-name">{name}</div>
|
| 493 |
<div class="card-prompt">{prompt}</div>
|
| 494 |
</div>
|