SondosMB commited on
Commit
1969f74
1 Parent(s): 8290d2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -5,14 +5,19 @@ import matplotlib.pyplot as plt
5
  from PIL import Image
6
  import pickle
7
  from tensorflow.keras.models import load_model
 
 
 
 
8
 
9
  # Load the RGB to hyperspectral conversion model
10
- converion_model = load_model('/kaggle/input/convmo/Conversion_model.h5')
 
11
 
12
  # Load the cancer classification model
13
  #cancer_model = pickle.load(open("/kaggle/input/classi/ClassRF (1).pkl", "rb"))
14
 
15
- cancer_model = pickle.load(open("/kaggle/input/logistic/LRclass.pkl", "rb"))
16
 
17
  def classify(rgb_image):
18
  img = Image.fromarray(rgb_image.astype('uint8'), 'RGB')
 
5
  from PIL import Image
6
  import pickle
7
  from tensorflow.keras.models import load_model
8
+ import os
9
+
10
+ os.system('wget -O model.h5 "https://drive.google.com/file/d/1UqXYR2e3c0VW8Ax4nYLvef7Vmlx3AEGi/view?usp=share_link')
11
+ os.system('wget -O model2.pkl "https://drive.google.com/file/d/16FuBwWEhG7oHH2YGm8EkEDTbv6GSUbyg/view?usp=share_link')
12
 
13
  # Load the RGB to hyperspectral conversion model
14
+ #converion_model = load_model('/kaggle/input/convmo/Conversion_model.h5')
15
+ converion_model = tf.keras.models.load_model('model.h5')
16
 
17
  # Load the cancer classification model
18
  #cancer_model = pickle.load(open("/kaggle/input/classi/ClassRF (1).pkl", "rb"))
19
 
20
+ cancer_model = pickle.load(open("model2.pkl", "rb"))
21
 
22
  def classify(rgb_image):
23
  img = Image.fromarray(rgb_image.astype('uint8'), 'RGB')