aaravlovescodes commited on
Commit
8dba6ca
·
verified ·
1 Parent(s): 3481d08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -6
app.py CHANGED
@@ -48,15 +48,10 @@ with st.sidebar:
48
  """)
49
  st.set_option("deprecation.showfileUploaderEncoding", False)
50
 
51
-
52
  @st.cache_resource(show_spinner=False)
53
  def load_model():
54
  try:
55
  from huggingface_hub import from_pretrained_keras
56
- config = tf.compat.v1.ConfigProto()
57
- config.gpu_options.allow_growth = True
58
- tf.compat.v1.keras.backend.set_session(tf.compat.v1.Session(config=config))
59
-
60
  keras.utils.set_random_seed(42)
61
  model = from_pretrained_keras("ryefoxlime/PneumoniaDetection")
62
  return model
@@ -64,7 +59,6 @@ def load_model():
64
  st.error(f"Error loading model: {str(e)}")
65
  return None
66
 
67
-
68
  with st.spinner("Model is being loaded..."):
69
  model = load_model()
70
 
 
48
  """)
49
  st.set_option("deprecation.showfileUploaderEncoding", False)
50
 
 
51
  @st.cache_resource(show_spinner=False)
52
  def load_model():
53
  try:
54
  from huggingface_hub import from_pretrained_keras
 
 
 
 
55
  keras.utils.set_random_seed(42)
56
  model = from_pretrained_keras("ryefoxlime/PneumoniaDetection")
57
  return model
 
59
  st.error(f"Error loading model: {str(e)}")
60
  return None
61
 
 
62
  with st.spinner("Model is being loaded..."):
63
  model = load_model()
64