Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,10 +2,13 @@ import gradio as gr
|
|
2 |
import tensorflow as tf
|
3 |
from tensorflow import keras
|
4 |
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
9 |
|
10 |
# classification labels
|
11 |
labels = ['compost', 'e-waste', 'recycle', 'trash']
|
|
|
2 |
import tensorflow as tf
|
3 |
from tensorflow import keras
|
4 |
|
5 |
+
import huggingface_hub
|
6 |
+
from huggingface_hub import from_pretrained_keras
|
7 |
|
8 |
+
|
9 |
+
# load custom pre-trained model from HuggingFace models
|
10 |
+
model_api_link = 'chaninder/waste-sorting-model'
|
11 |
+
pre_trained_model = from_pretrained_keras(model_api_link)
|
12 |
|
13 |
# classification labels
|
14 |
labels = ['compost', 'e-waste', 'recycle', 'trash']
|