AliAmr0 commited on
Commit
9899694
·
verified ·
1 Parent(s): 08bb1cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,12 +1,13 @@
1
  import streamlit as st
2
  import tensorflow as tf
3
- from tensorflow.keras.applications.resnet50 import ResNet50, preprocess_input
4
  from tensorflow.keras.preprocessing import image
5
  import numpy as np
6
  from PIL import Image
7
 
8
- # Load pre-trained ResNet50 model
9
- model = tf.keras.models.load_model("resnet50_kidney_ct_augmented.h5") # Update this path if you are using a .pb file
 
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"]