Spaces:
Sleeping
Sleeping
Commit History
-
Explain the ViT with Grad-CAM instead of an ImageNet ResNet-50
The ResNet-50 was never trained on the MRI data, so its CAM and its ImageNet labels (e.g. "gasmask") said nothing about cad vs healthy. Replace it with Grad-CAM of raedinkhaled/vit-base-mri for the predicted class, next to the attention rollout. The Grad-CAM layer is looked up by name (its path changed in transformers 5) and requests are serialized because the forward hook is shared model state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>448a050 -
Fix build for Gradio 6 and update app for current libraries
- requirements.txt: move to transformers 5.x (Gradio 6 needs huggingface-hub>=1.16, every transformers 4.x pins <1.0), pin tested versions and use CPU-only torch wheels - README: pin python_version 3.13 and link the ViT model - app.py: port from the removed gr.inputs/gr.outputs API to gr.Blocks; load the 2022 ViT with eager attention so attention rollout works; show ImageNet labels for the ResNet (indexing labels.json raised IndexError); fix heatmap min-max overflow and BGR/RGB swap; use the ViT's own 0.5/0.5 normalization; accept grayscale and RGBA images - plot.py: titles from the new label dicts - remove labels.json (labels now come from the model config) and examples/.DS_Store Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>f5f29b5 -
Create requirements.txt
Verified signaturea3f4ea8 -
Update README.md
Verified signatureUpgraded to latest Gradio SDK : 6.29.11f41262
-
hjj
5e7fd2b -
Add application file
a7da823 -
Create app.py
5174b1f -
Upload IM00001 46.jpg
b6c245f -
Create plot.py
a14b289 -
Create labels.json
0304304 -
initial commit
a39ec8e