Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -40,22 +40,19 @@ first_load = True
|
|
40 |
# ================== UI Helpers ==================
|
41 |
def generate_pretty_html(data):
|
42 |
html = """
|
43 |
-
<div
|
44 |
-
|
45 |
-
box-shadow: 0 4px 12px rgba(0,0,0,0.1);">
|
46 |
-
<h2 style="color: #2c3e50; border-bottom: 2px solid #ddd; padding-bottom: 10px;">Model Info</h2>
|
47 |
"""
|
48 |
for key, value in data.items():
|
49 |
html += f"""
|
50 |
-
<div
|
51 |
-
<strong
|
52 |
-
<span
|
53 |
</div>
|
54 |
"""
|
55 |
html += "</div>"
|
56 |
return html
|
57 |
|
58 |
-
|
59 |
def load_config():
|
60 |
with open("config.yaml", "r", encoding="utf-8") as f:
|
61 |
return yaml.safe_load(f)
|
|
|
40 |
# ================== UI Helpers ==================
|
41 |
def generate_pretty_html(data):
|
42 |
html = """
|
43 |
+
<div class="font-sans max-w-xl mx-auto bg-gray-100 rounded-lg p-6 shadow-md">
|
44 |
+
<h2 class="text-xl font-semibold text-gray-800 border-b border-gray-300 pb-2 mb-4">Model Info</h2>
|
|
|
|
|
45 |
"""
|
46 |
for key, value in data.items():
|
47 |
html += f"""
|
48 |
+
<div class="mb-3">
|
49 |
+
<strong class="text-blue-700 inline-block w-40">{key}:</strong>
|
50 |
+
<span class="text-gray-800">{value}</span>
|
51 |
</div>
|
52 |
"""
|
53 |
html += "</div>"
|
54 |
return html
|
55 |
|
|
|
56 |
def load_config():
|
57 |
with open("config.yaml", "r", encoding="utf-8") as f:
|
58 |
return yaml.safe_load(f)
|