Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Added bioRxiv preprint citation in README and Gradio app help tab ([doi:10.64898/2026.04.08.717021](https://doi.org/10.64898/2026.04.08.717021)) ([#18](https://github.com/AG-Walz/immunotype/pull/18))

### Fixed
- Gradio app showed both light and dark logos at once when not launched via the CLI (e.g. on HF Space) ([#19](https://github.com/AG-Walz/immunotype/pull/19))

## [1.0.3]

### Fixed
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![PyPI version](https://badge.fury.io/py/immunotype.svg)](https://badge.fury.io/py/immunotype)
[![Python versions](https://img.shields.io/pypi/pyversions/immunotype.svg)](https://pypi.org/project/immunotype/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Hugging Face Space](https://img.shields.io/badge/Hugging%20Face-Space-FFD21E?logo=huggingface&logoColor=000)](https://huggingface.co/spaces/immunotype/immunotype)

immunotype predicts HLA class I alleles directly from immunopeptidomics data — no separate HLA typing experiment needed. immunotype combines a graph neural network with a curated mono-allelic lookup table in an ensemble model, achieving **87.2% accuracy** at protein-level resolution across diverse human tissues.

Expand Down Expand Up @@ -58,6 +59,8 @@ immunotype --help

### App Interface

Try it online without installing — the hosted app on [Hugging Face Spaces](https://huggingface.co/spaces/immunotype/immunotype). Or run it locally:

```bash
# Install with app dependencies
pip install immunotype[app]
Expand Down
16 changes: 11 additions & 5 deletions src/immunotype/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ def create_interface():
title="immunotype",
) as app:
gr.HTML(
# Theme-aware logo swap. The CSS lives inline here (not in the
# launch() css= argument) so it travels with the component and
# applies regardless of how the app is launched (CLI, HF Space,
# programmatic). Otherwise both logos render at once.
"<style>"
".logo-dark { display: none !important; }"
".logo-light { display: inline-block !important; }"
".dark .logo-dark { display: inline-block !important; }"
".dark .logo-light { display: none !important; }"
"</style>"
f"<div style='display: flex; align-items: center; gap: 16px; margin-bottom: 8px;'>"
f"<img class='logo-dark' src='data:image/png;base64,{_logo_dark_b64}' "
f"style='height: 48px;' alt='immunotype'>"
Expand Down Expand Up @@ -316,11 +326,7 @@ def create_interface():
# Main function to launch the app via CLI
def main():
app = create_interface()
app.launch(
theme=theme,
css=".logo-dark { display: none; } .logo-light { display: inline; } "
".dark .logo-dark { display: inline; } .dark .logo-light { display: none; }",
)
app.launch(theme=theme)


# For direct execution of the app interface
Expand Down
Loading