Spaces:
Sleeping
Sleeping
Jan Biermeyer
commited on
Commit
·
6d6c666
1
Parent(s):
870a509
logo fixes
Browse files
app.py
CHANGED
|
@@ -671,13 +671,28 @@ def call_enhanced_model_with_rag(prompt: str) -> tuple[Optional[str], float]:
|
|
| 671 |
|
| 672 |
def load_logo() -> str:
|
| 673 |
"""Load and encode the SUPRA logo."""
|
| 674 |
-
|
| 675 |
-
|
| 676 |
-
|
| 677 |
-
|
| 678 |
-
|
| 679 |
-
|
| 680 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 681 |
|
| 682 |
def main():
|
| 683 |
# Animated background blobs - matching launch page
|
|
@@ -699,7 +714,7 @@ def main():
|
|
| 699 |
<div class="main-header">
|
| 700 |
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;">
|
| 701 |
<div class="float-animation">
|
| 702 |
-
<img src
|
| 703 |
</div>
|
| 704 |
<div style="text-align: center;">
|
| 705 |
<h1 class="supra-title gradient-text">Intelligence Unchained</h1>
|
|
|
|
| 671 |
|
| 672 |
def load_logo() -> str:
|
| 673 |
"""Load and encode the SUPRA logo."""
|
| 674 |
+
# Try multiple possible paths
|
| 675 |
+
possible_paths = [
|
| 676 |
+
Path(__file__).parent / "assets" / "supra_logo.png",
|
| 677 |
+
Path(__file__).parent / "assets" / "supra_logo_full.png",
|
| 678 |
+
Path("assets/supra_logo.png"),
|
| 679 |
+
Path("assets/supra_logo_full.png"),
|
| 680 |
+
]
|
| 681 |
+
|
| 682 |
+
for logo_path in possible_paths:
|
| 683 |
+
if logo_path.exists():
|
| 684 |
+
try:
|
| 685 |
+
with open(logo_path, "rb") as f:
|
| 686 |
+
logo_data = f.read()
|
| 687 |
+
logo_b64 = base64.b64encode(logo_data).decode()
|
| 688 |
+
logger.info(f"✅ Loaded logo from: {logo_path}")
|
| 689 |
+
return f"data:image/png;base64,{logo_b64}"
|
| 690 |
+
except Exception as e:
|
| 691 |
+
logger.warning(f"⚠️ Could not load logo from {logo_path}: {e}")
|
| 692 |
+
continue
|
| 693 |
+
|
| 694 |
+
logger.warning("⚠️ Logo file not found in any expected location")
|
| 695 |
+
return "" # Return empty string instead of None to avoid "None" in HTML
|
| 696 |
|
| 697 |
def main():
|
| 698 |
# Animated background blobs - matching launch page
|
|
|
|
| 714 |
<div class="main-header">
|
| 715 |
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;">
|
| 716 |
<div class="float-animation">
|
| 717 |
+
{"<img src=\"" + logo_b64 + "\" class=\"glow-box\" style=\"width: 128px; height: 128px; object-fit: contain; margin: 0 auto;\" />" if logo_b64 else "<div style=\"width: 128px; height: 128px;\"></div>"}
|
| 718 |
</div>
|
| 719 |
<div style="text-align: center;">
|
| 720 |
<h1 class="supra-title gradient-text">Intelligence Unchained</h1>
|