Spaces:
Runtime error
Runtime error
Commit ·
8f625d2
1
Parent(s): 8fc0fba
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,6 @@ import tensorflow as tf
|
|
| 3 |
import zipfile
|
| 4 |
from tensorflow.keras.models import load_model
|
| 5 |
|
| 6 |
-
@st.cache(allow_output_mutation=True)
|
| 7 |
# Unzipping model
|
| 8 |
zip_ref = zipfile.ZipFile("L10_fine_tuned_model.zip", "r")
|
| 9 |
zip_ref.extractall()
|
|
@@ -13,6 +12,7 @@ zip_ref.close()
|
|
| 13 |
model_1=load_model("L10_fine_tuned_model")
|
| 14 |
model_2=load_model("L10_fine_tuned_model")
|
| 15 |
|
|
|
|
| 16 |
def load_and_predict_image(model,Input,scale=False):
|
| 17 |
classes=['bacterial_leaf_blight', 'bacterial_leaf_streak', 'bacterial_panicle_blight', 'blast', 'brown_spot', 'dead_heart', 'downy_mildew', 'hispa', 'normal', 'tungro']
|
| 18 |
#img=tf.io.read_file(Input)
|
|
|
|
| 3 |
import zipfile
|
| 4 |
from tensorflow.keras.models import load_model
|
| 5 |
|
|
|
|
| 6 |
# Unzipping model
|
| 7 |
zip_ref = zipfile.ZipFile("L10_fine_tuned_model.zip", "r")
|
| 8 |
zip_ref.extractall()
|
|
|
|
| 12 |
model_1=load_model("L10_fine_tuned_model")
|
| 13 |
model_2=load_model("L10_fine_tuned_model")
|
| 14 |
|
| 15 |
+
@st.cache(allow_output_mutation=True)
|
| 16 |
def load_and_predict_image(model,Input,scale=False):
|
| 17 |
classes=['bacterial_leaf_blight', 'bacterial_leaf_streak', 'bacterial_panicle_blight', 'blast', 'brown_spot', 'dead_heart', 'downy_mildew', 'hispa', 'normal', 'tungro']
|
| 18 |
#img=tf.io.read_file(Input)
|