--- title: BacterialIdentifierShowcase emoji: 🐨 colorFrom: red colorTo: pink sdk: gradio sdk_version: 6.14.0 python_version: '3.13' app_file: app.py pinned: false license: apache-2.0 --- # PhenotypeClassifier Complete Package PhenotypeClassifier is a phenotype-based bacterial genus prediction tool. This package includes: - `phenotype_tinytransformer_v1_temperature_scaled.pt` — calibrated TinyTransformer model - `phenotype_inference.py` — reusable inference module - `phenotype_next_tests.py` — model-based next-test recommender - `phenotype_reference_distributions.json` — compact phenotype distribution reference - `example_usage.py` — simple example script - `requirements.txt` — dependencies ## What it does Given structured phenotype fields, it predicts likely bacterial genus and returns: - Top genus - Ranked genera - Confidence - Distinctness - Missing fields - Discriminatory next-test recommendations - Confirmation next-test recommendations ## Run example ```bash pip install -r requirements.txt python example_usage.py ``` ## Python usage ```python from phenotype_inference import PhenotypeClassifier from phenotype_next_tests import PhenotypeNextTestRecommender classifier = PhenotypeClassifier('phenotype_tinytransformer_v1_temperature_scaled.pt') recommender = PhenotypeNextTestRecommender(classifier, 'phenotype_reference_distributions.json') features = { 'Gram Stain': 'Negative', 'Shape': 'Rods', 'Catalase': 'Positive', 'Oxidase': 'Positive', } prediction = classifier.predict(features) recommendations = recommender.recommend(features) ``` ## Important limitation This is a phenotype-based genus prediction tool. It is not a confirmed laboratory identification, not a diagnostic result, and should not replace validated microbiology workflows.