Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available: 6.20.0
metadata
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 modelphenotype_inference.pyβ reusable inference modulephenotype_next_tests.pyβ model-based next-test recommenderphenotype_reference_distributions.jsonβ compact phenotype distribution referenceexample_usage.pyβ simple example scriptrequirements.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
pip install -r requirements.txt
python example_usage.py
Python usage
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.