Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,13 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import tensorflow as tf
|
| 3 |
-
from tensorflow.keras.applications.resnet50 import
|
| 4 |
from tensorflow.keras.preprocessing import image
|
| 5 |
import numpy as np
|
| 6 |
from PIL import Image
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
# Class labels (change based on your model's labels)
|
| 12 |
labels = ["Cyst", "Normal", "Stone", "Tumor"]
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import tensorflow as tf
|
| 3 |
+
from tensorflow.keras.applications.resnet50 import preprocess_input
|
| 4 |
from tensorflow.keras.preprocessing import image
|
| 5 |
import numpy as np
|
| 6 |
from PIL import Image
|
| 7 |
|
| 8 |
+
# Download the model from Hugging Face
|
| 9 |
+
model_path = hf_hub_download(repo_id="AliAmr0/Kidney-Classification-Using-Resnet50", filename="model.h5")
|
| 10 |
+
model = tf.keras.models.load_model(model_path)
|
| 11 |
|
| 12 |
# Class labels (change based on your model's labels)
|
| 13 |
labels = ["Cyst", "Normal", "Stone", "Tumor"]
|