Spaces:
Running
Running
Use the real MyHeartCounts heart logo in the wordmark + favicon
Browse files- Dockerfile +1 -1
- app.py +10 -3
- logo.png +0 -0
Dockerfile
CHANGED
|
@@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends git \
|
|
| 20 |
RUN pip install --no-cache-dir --no-deps \
|
| 21 |
"openmhc @ git+https://github.com/AshleyLab/myheartcounts-dataset@71eb4621594fed59a472a2ce513399a38059f801"
|
| 22 |
|
| 23 |
-
COPY app.py leaderboard_compute.py ./
|
| 24 |
|
| 25 |
ENV PORT=7860
|
| 26 |
EXPOSE 7860
|
|
|
|
| 20 |
RUN pip install --no-cache-dir --no-deps \
|
| 21 |
"openmhc @ git+https://github.com/AshleyLab/myheartcounts-dataset@71eb4621594fed59a472a2ce513399a38059f801"
|
| 22 |
|
| 23 |
+
COPY app.py leaderboard_compute.py logo.png ./
|
| 24 |
|
| 25 |
ENV PORT=7860
|
| 26 |
EXPOSE 7860
|
app.py
CHANGED
|
@@ -12,9 +12,10 @@ MyHeartCounts / OpenMHC site (light theme, red accent).
|
|
| 12 |
from __future__ import annotations
|
| 13 |
|
| 14 |
import html
|
|
|
|
| 15 |
|
| 16 |
from fastapi import FastAPI
|
| 17 |
-
from fastapi.responses import HTMLResponse
|
| 18 |
|
| 19 |
from leaderboard_compute import compute_imputation_rows
|
| 20 |
|
|
@@ -46,6 +47,7 @@ PAGE = """<!doctype html>
|
|
| 46 |
<meta charset="utf-8">
|
| 47 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 48 |
<title>OpenMHC Leaderboard</title>
|
|
|
|
| 49 |
<style>
|
| 50 |
:root{
|
| 51 |
--bg:#ffffff; --fg:#141b25; --muted:#6b7280; --line:#e8eaed; --soft:#f6f7f8;
|
|
@@ -62,7 +64,7 @@ a{color:inherit;text-decoration:none;}
|
|
| 62 |
.topbar{display:flex;align-items:center;justify-content:space-between;
|
| 63 |
padding:20px 0;border-bottom:1px solid var(--line);}
|
| 64 |
.brand{font-weight:800;letter-spacing:.02em;font-size:15px;display:inline-flex;align-items:center;gap:9px;}
|
| 65 |
-
.brand .
|
| 66 |
.nav-active{color:var(--accent);font-weight:700;font-size:14px;border-bottom:2px solid var(--accent);padding-bottom:4px;}
|
| 67 |
|
| 68 |
.hero{padding:56px 0 28px;}
|
|
@@ -98,7 +100,7 @@ code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;colo
|
|
| 98 |
<body>
|
| 99 |
<div class="wrap">
|
| 100 |
<div class="topbar">
|
| 101 |
-
<a class="brand" href="%%SITE%%"><
|
| 102 |
<span class="nav-active">Benchmark</span>
|
| 103 |
</div>
|
| 104 |
|
|
@@ -185,3 +187,8 @@ def index() -> str:
|
|
| 185 |
def health() -> dict:
|
| 186 |
rows, error = _rows()
|
| 187 |
return {"status": "ok" if error is None else "error", "methods": len(rows or []), "error": error}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
from __future__ import annotations
|
| 13 |
|
| 14 |
import html
|
| 15 |
+
from pathlib import Path
|
| 16 |
|
| 17 |
from fastapi import FastAPI
|
| 18 |
+
from fastapi.responses import FileResponse, HTMLResponse
|
| 19 |
|
| 20 |
from leaderboard_compute import compute_imputation_rows
|
| 21 |
|
|
|
|
| 47 |
<meta charset="utf-8">
|
| 48 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 49 |
<title>OpenMHC Leaderboard</title>
|
| 50 |
+
<link rel="icon" type="image/png" href="/logo.png">
|
| 51 |
<style>
|
| 52 |
:root{
|
| 53 |
--bg:#ffffff; --fg:#141b25; --muted:#6b7280; --line:#e8eaed; --soft:#f6f7f8;
|
|
|
|
| 64 |
.topbar{display:flex;align-items:center;justify-content:space-between;
|
| 65 |
padding:20px 0;border-bottom:1px solid var(--line);}
|
| 66 |
.brand{font-weight:800;letter-spacing:.02em;font-size:15px;display:inline-flex;align-items:center;gap:9px;}
|
| 67 |
+
.brand .logo{height:26px;width:auto;display:block;}
|
| 68 |
.nav-active{color:var(--accent);font-weight:700;font-size:14px;border-bottom:2px solid var(--accent);padding-bottom:4px;}
|
| 69 |
|
| 70 |
.hero{padding:56px 0 28px;}
|
|
|
|
| 100 |
<body>
|
| 101 |
<div class="wrap">
|
| 102 |
<div class="topbar">
|
| 103 |
+
<a class="brand" href="%%SITE%%"><img class="logo" src="/logo.png" alt="MyHeartCounts logo"> MY HEART COUNTS</a>
|
| 104 |
<span class="nav-active">Benchmark</span>
|
| 105 |
</div>
|
| 106 |
|
|
|
|
| 187 |
def health() -> dict:
|
| 188 |
rows, error = _rows()
|
| 189 |
return {"status": "ok" if error is None else "error", "methods": len(rows or []), "error": error}
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
@app.get("/logo.png")
|
| 193 |
+
def logo() -> FileResponse:
|
| 194 |
+
return FileResponse(Path(__file__).parent / "logo.png", media_type="image/png")
|
logo.png
ADDED
|