Instructions to use starpreeda/BrainTumorTest with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use starpreeda/BrainTumorTest with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://starpreeda/BrainTumorTest") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -68,7 +68,7 @@ def predict_mri(image_path):
|
|
| 68 |
img = Image.open(image_path).convert('RGB')
|
| 69 |
img = img.resize((224, 224))
|
| 70 |
img_array = np.array(img, dtype=np.float32)
|
| 71 |
-
img_array = np.expand_dims(img_array, axis=0)
|
| 72 |
|
| 73 |
predictions = model.predict(img_array)
|
| 74 |
predicted_class = class_names[np.argmax(predictions[0])]
|
|
|
|
| 68 |
img = Image.open(image_path).convert('RGB')
|
| 69 |
img = img.resize((224, 224))
|
| 70 |
img_array = np.array(img, dtype=np.float32)
|
| 71 |
+
img_array = np.expand_dims(img_array, axis=0)
|
| 72 |
|
| 73 |
predictions = model.predict(img_array)
|
| 74 |
predicted_class = class_names[np.argmax(predictions[0])]
|