chaninder commited on
Commit
24a6ece
1 Parent(s): d44854d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -2,10 +2,13 @@ import gradio as gr
2
  import tensorflow as tf
3
  from tensorflow import keras
4
 
 
 
5
 
6
- # load pre-trained model
7
- model_path = "/Users/chaninderrishi/Desktop/ML/projects/waste-sorting/models/prod3"
8
- pre_trained_model = keras.models.load_model(model_path)
 
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']