Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
from tensorflow.keras.preprocessing import image
|
4 |
import numpy as np
|
5 |
|
6 |
-
# Load your trained model
|
7 |
-
model = load_model("waste_sort_model
|
8 |
class_names = ["Non-Recyclable", "Recyclable"]
|
9 |
|
10 |
def classify_image(img):
|
@@ -29,3 +29,4 @@ interface = gr.Interface(
|
|
29 |
# Launch the Gradio app
|
30 |
if __name__ == "__main__":
|
31 |
interface.launch()
|
|
|
|
1 |
import gradio as gr
|
2 |
+
import tensorflow as tf
|
3 |
from tensorflow.keras.preprocessing import image
|
4 |
import numpy as np
|
5 |
|
6 |
+
# Load your trained model (SavedModel format)
|
7 |
+
model = tf.keras.models.load_model("waste_sort_model") # Loading from SavedModel directory
|
8 |
class_names = ["Non-Recyclable", "Recyclable"]
|
9 |
|
10 |
def classify_image(img):
|
|
|
29 |
# Launch the Gradio app
|
30 |
if __name__ == "__main__":
|
31 |
interface.launch()
|
32 |
+
|