Update app.py
Browse files
app.py
CHANGED
|
@@ -37,9 +37,7 @@ HF_TOKEN = os.environ.get("HF_TOKEN") # add as a Space SECRET to enable the cha
|
|
| 37 |
ROUTER_URL = "https://router.huggingface.co/v1/chat/completions"
|
| 38 |
|
| 39 |
PAGE_DISCLAIMER = (
|
| 40 |
-
"This tool is a research/portfolio project, not a medical device.
|
| 41 |
-
"been clinically validated. Use it to get informed and organize your thoughts "
|
| 42 |
-
"before a real appointment — not as a substitute for one."
|
| 43 |
)
|
| 44 |
|
| 45 |
# Optional second classifier specifically for pigmented-lesion cases (HAM10000-based,
|
|
@@ -365,7 +363,11 @@ def chat_respond(message, history):
|
|
| 365 |
# ---------------------------------------------------------------------------
|
| 366 |
# Model Performance tab data loading
|
| 367 |
# ---------------------------------------------------------------------------
|
| 368 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 369 |
|
| 370 |
|
| 371 |
def load_performance_reports():
|
|
@@ -458,18 +460,6 @@ about what it isn't: a validated medical device.
|
|
| 458 |
- 🟢 **Low** — typically manageable with general skin care. Doctor visit
|
| 459 |
optional, especially if unsure or it's not improving.
|
| 460 |
|
| 461 |
-
### Known limitations (read this before trusting the output)
|
| 462 |
-
- **Not clinically validated.** Benchmark accuracy on a public dataset is
|
| 463 |
-
not the same as real-world diagnostic reliability.
|
| 464 |
-
- **Dataset label limitations.** The DermNet taxonomy combines melanoma
|
| 465 |
-
with benign moles under one label — the app defaults that whole category
|
| 466 |
-
to High severity rather than pretending to distinguish them.
|
| 467 |
-
- **Skin-tone representation.** Public dermatology datasets skew toward
|
| 468 |
-
lighter skin tones; performance on underrepresented skin tones is
|
| 469 |
-
unverified without a dedicated bias audit.
|
| 470 |
-
- **No clinical validation, IRB review, or regulatory clearance** has been
|
| 471 |
-
done. This should inform, not replace, professional care.
|
| 472 |
-
|
| 473 |
{PAGE_DISCLAIMER}
|
| 474 |
"""
|
| 475 |
|
|
|
|
| 37 |
ROUTER_URL = "https://router.huggingface.co/v1/chat/completions"
|
| 38 |
|
| 39 |
PAGE_DISCLAIMER = (
|
| 40 |
+
"This tool is a research/portfolio project, not a medical device."
|
|
|
|
|
|
|
| 41 |
)
|
| 42 |
|
| 43 |
# Optional second classifier specifically for pigmented-lesion cases (HAM10000-based,
|
|
|
|
| 363 |
# ---------------------------------------------------------------------------
|
| 364 |
# Model Performance tab data loading
|
| 365 |
# ---------------------------------------------------------------------------
|
| 366 |
+
BASE_DIR = Path(__file__).resolve().parent
|
| 367 |
+
ASSETS_DIR = BASE_DIR / "assets"
|
| 368 |
+
|
| 369 |
+
CONFUSION_MATRIX = ASSETS_DIR / "confusion_matrix.png"
|
| 370 |
+
ROC_CURVE = ASSETS_DIR / "roc_curve.png"
|
| 371 |
|
| 372 |
|
| 373 |
def load_performance_reports():
|
|
|
|
| 460 |
- 🟢 **Low** — typically manageable with general skin care. Doctor visit
|
| 461 |
optional, especially if unsure or it's not improving.
|
| 462 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 463 |
{PAGE_DISCLAIMER}
|
| 464 |
"""
|
| 465 |
|