yvesJR-237 commited on
Commit
b30c8dd
·
verified ·
1 Parent(s): e7d0aa8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -102,16 +102,16 @@ with tab1:
102
  st.info("Please upload an image to classify.")
103
  else:
104
  st.info("Using Pretrained model")
105
- # model = tf.keras.models.load_model("./models/medical_classifier.h5")
106
- model = TFAutoModel.from_pretrained('./models/medical_classifier')
107
- config = model.config
108
- if 'batch_shape' in config:
109
- config['input_shape'] = config.pop('batch_shape')[1:] # Remove batch size
110
 
111
- # Create the input layer with the corrected configuration
112
- input_layer = InputLayer(**model.config)
113
- # Rebuild the model (if necessary)
114
- model.build(input_shape=model.config['input_shape'])
115
 
116
  if image_file is not None:
117
  predict_class = Analysing_image(st, model, image_file)
 
102
  st.info("Please upload an image to classify.")
103
  else:
104
  st.info("Using Pretrained model")
105
+ model = tf.keras.models.load_model("./models/medical_classifier.h5")
106
+ # model = TFAutoModel.from_pretrained('./models/medical_classifier')
107
+ # config = model.config
108
+ # if 'batch_shape' in config:
109
+ # config['input_shape'] = config.pop('batch_shape')[1:] # Remove batch size
110
 
111
+ # # Create the input layer with the corrected configuration
112
+ # input_layer = InputLayer(**model.config)
113
+ # # Rebuild the model (if necessary)
114
+ # model.build(input_shape=model.config['input_shape'])
115
 
116
  if image_file is not None:
117
  predict_class = Analysing_image(st, model, image_file)