Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,15 @@ import tensorflow as tf
|
|
6 |
from tensorflow.keras.applications.resnet50 import preprocess_input
|
7 |
from tensorflow.keras.preprocessing.image import img_to_array
|
8 |
|
|
|
|
|
9 |
def main():
|
10 |
st.title('Jacaranda Identification')
|
11 |
|
12 |
st.markdown("This is a Deep Learning application to identify if a satellite image clip contains Jacaranda trees.\n")
|
13 |
st.markdown('The predicting result will be "Jacaranda", or "Others".')
|
14 |
st.markdown('You can click "Browse files" multiple times until adding all images before generating prediction.\n')
|
|
|
15 |
|
16 |
run_the_app()
|
17 |
|
@@ -42,6 +45,9 @@ def convert_df(df):
|
|
42 |
|
43 |
def run_the_app():
|
44 |
|
|
|
|
|
|
|
45 |
class_names = ['Jacaranda', 'Others']
|
46 |
model = load_model()
|
47 |
df = generate_df()
|
|
|
6 |
from tensorflow.keras.applications.resnet50 import preprocess_input
|
7 |
from tensorflow.keras.preprocessing.image import img_to_array
|
8 |
|
9 |
+
from datasets import load_dataset
|
10 |
+
|
11 |
def main():
|
12 |
st.title('Jacaranda Identification')
|
13 |
|
14 |
st.markdown("This is a Deep Learning application to identify if a satellite image clip contains Jacaranda trees.\n")
|
15 |
st.markdown('The predicting result will be "Jacaranda", or "Others".')
|
16 |
st.markdown('You can click "Browse files" multiple times until adding all images before generating prediction.\n')
|
17 |
+
st.markdown('The image clips can look like these examples. The image size can be arbitrary but better not include too much contents.')
|
18 |
|
19 |
run_the_app()
|
20 |
|
|
|
45 |
|
46 |
def run_the_app():
|
47 |
|
48 |
+
dataset = load_dataset('jacaranda', split='train')
|
49 |
+
st.image(dataset[0:5]['image'])
|
50 |
+
|
51 |
class_names = ['Jacaranda', 'Others']
|
52 |
model = load_model()
|
53 |
df = generate_df()
|