Jainam117 commited on
Commit
ac4cdc6
·
verified ·
1 Parent(s): c09a28e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,15 +1,17 @@
1
  import streamlit as st
 
2
  from huggingface_hub import from_pretrained_keras
3
  from PIL import Image
4
  import numpy as np
5
  import tensorflow as tf
6
 
7
  @st.cache_resource
8
- def load_model():
9
- model = from_pretrained_keras("Jainam117/Sign_Langauge_digit_classification/sign_lan_digit_model.h5")
 
 
10
  return model
11
 
12
-
13
  def preprocess_image(image):
14
 
15
  image = image.convert("L")
 
1
  import streamlit as st
2
+ from tensorflow.keras.models import load_model
3
  from huggingface_hub import from_pretrained_keras
4
  from PIL import Image
5
  import numpy as np
6
  import tensorflow as tf
7
 
8
  @st.cache_resource
9
+ def load_model_h5():
10
+ model_path = hf_hub_download(repo_id="Jainam117/Sign_Langauge_digit_classification",
11
+ filename="sign_lan_digit_model.h5")
12
+ model = load_model(model_path)
13
  return model
14
 
 
15
  def preprocess_image(image):
16
 
17
  image = image.convert("L")