Download xray_generator/__init__.py from pyamy/cxr-diffusion: direct link, hf CLI and curl.
- Browser
- Download file 857 Bytes
-
https://huggingface.co/pyamy/cxr-diffusion/resolve/main/xray_generator/__init__.py
- Command line
-
hf download hf://pyamy/cxr-diffusion/xray_generator/__init__.py
-
curl -L -o __init__.py https://huggingface.co/pyamy/cxr-diffusion/resolve/main/xray_generator/__init__.py
857 Bytes
| # xray_generator/__init__.py | |
| import logging | |
| from pkg_resources import get_distribution, DistributionNotFound | |
| # Set up package-wide logging | |
| logger = logging.getLogger(__name__) | |
| handler = logging.StreamHandler() | |
| formatter = logging.Formatter('%(asctime)s | %(name)s | %(levelname)s | %(message)s') | |
| handler.setFormatter(formatter) | |
| logger.addHandler(handler) | |
| logger.setLevel(logging.INFO) | |
| # Import main components | |
| from .models import MedicalVAE, MedicalTextEncoder, DiffusionUNet, DiffusionModel | |
| from .inference import XrayGenerator | |
| # Version tracking | |
| try: | |
| __version__ = get_distribution("xray_generator").version | |
| except DistributionNotFound: | |
| # Package not installed | |
| __version__ = "0.1.0-dev" | |
| __all__ = [ | |
| 'MedicalVAE', | |
| 'MedicalTextEncoder', | |
| 'DiffusionUNet', | |
| 'DiffusionModel', | |
| 'XrayGenerator' | |
| ] |