Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,17 +1,12 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import tensorflow as tf
|
| 3 |
-
import requests
|
| 4 |
-
from io import BytesIO
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
model = tf.keras.models.load_model(BytesIO(response.content))
|
| 10 |
-
return model
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
| 14 |
-
model = download_model(MODEL_URL)
|
| 15 |
|
| 16 |
# Define class names based on your labels
|
| 17 |
CLASS_NAMES = [
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import tensorflow as tf
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
# Define the path to your model relative to `app.py`
|
| 5 |
+
# Since they're in the same directory, you just need the model file name
|
| 6 |
+
MODEL_PATH = 'fruitquality-1.0.h5'
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
# Load the model directly from the file system
|
| 9 |
+
model = tf.keras.models.load_model(MODEL_PATH)
|
|
|
|
| 10 |
|
| 11 |
# Define class names based on your labels
|
| 12 |
CLASS_NAMES = [
|