Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ from tensorflow.keras.models import load_model
|
|
| 8 |
import os
|
| 9 |
|
| 10 |
os.system('wget -O model.h5 "https://drive.google.com/u/0/uc?id=1UqXYR2e3c0VW8Ax4nYLvef7Vmlx3AEGi&export=download"')
|
| 11 |
-
os.system('wget -O model2.pkl "https://drive.google.com/u/0/uc?id=
|
| 12 |
|
| 13 |
# Load the RGB to hyperspectral conversion model
|
| 14 |
#converion_model = load_model('/kaggle/input/convmo/Conversion_model.h5')
|
|
@@ -35,10 +35,10 @@ def classify(rgb_image):
|
|
| 35 |
imgplot = hyperspectral_image.numpy().astype(np.float32)
|
| 36 |
imgplot= imgplot.reshape(-1, 272*512*16)
|
| 37 |
prediction = cancer_model.predict(imgplot)
|
| 38 |
-
if
|
| 39 |
-
|
| 40 |
else:
|
| 41 |
-
|
| 42 |
return x
|
| 43 |
|
| 44 |
# Define the Gradio interface
|
|
|
|
| 8 |
import os
|
| 9 |
|
| 10 |
os.system('wget -O model.h5 "https://drive.google.com/u/0/uc?id=1UqXYR2e3c0VW8Ax4nYLvef7Vmlx3AEGi&export=download"')
|
| 11 |
+
os.system('wget -O model2.pkl "https://drive.google.com/u/0/uc?id=1avoaq0fNGrLb4JatN0C-3rL8VnX2x4Ch&export=download"')
|
| 12 |
|
| 13 |
# Load the RGB to hyperspectral conversion model
|
| 14 |
#converion_model = load_model('/kaggle/input/convmo/Conversion_model.h5')
|
|
|
|
| 35 |
imgplot = hyperspectral_image.numpy().astype(np.float32)
|
| 36 |
imgplot= imgplot.reshape(-1, 272*512*16)
|
| 37 |
prediction = cancer_model.predict(imgplot)
|
| 38 |
+
if prediction == 0:
|
| 39 |
+
x= "High Risk of being a Cancerous Mole"
|
| 40 |
else:
|
| 41 |
+
x="Normal mole"
|
| 42 |
return x
|
| 43 |
|
| 44 |
# Define the Gradio interface
|