Spaces:
Sleeping
Sleeping
wracell
commited on
Commit
·
652d7e3
1
Parent(s):
7884ede
- requirements.txt +2 -1
- src/app.py +4 -1
requirements.txt
CHANGED
|
@@ -2,4 +2,5 @@ streamlit
|
|
| 2 |
tensorflow
|
| 3 |
keras
|
| 4 |
numpy
|
| 5 |
-
matplotlib
|
|
|
|
|
|
| 2 |
tensorflow
|
| 3 |
keras
|
| 4 |
numpy
|
| 5 |
+
matplotlib
|
| 6 |
+
os
|
src/app.py
CHANGED
|
@@ -2,9 +2,12 @@ import streamlit as st
|
|
| 2 |
from keras.models import load_model
|
| 3 |
from keras.preprocessing.image import load_img, img_to_array
|
| 4 |
import numpy as np
|
|
|
|
| 5 |
|
| 6 |
# Load model
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Class labels
|
| 10 |
class_names = ['Bangus', 'Big Head Carp', 'Black Spotted Barb', 'Catfish', 'Climbing Perch',
|
|
|
|
| 2 |
from keras.models import load_model
|
| 3 |
from keras.preprocessing.image import load_img, img_to_array
|
| 4 |
import numpy as np
|
| 5 |
+
import os
|
| 6 |
|
| 7 |
# Load model
|
| 8 |
+
model_path = os.path.join(os.path.dirname(__file__), 'FishModel_VGG16.h5')
|
| 9 |
+
model = load_model(model_path, compile=False)
|
| 10 |
+
|
| 11 |
|
| 12 |
# Class labels
|
| 13 |
class_names = ['Bangus', 'Big Head Carp', 'Black Spotted Barb', 'Catfish', 'Climbing Perch',
|