Fola-lad commited on
Commit
ac0c5d3
Β·
1 Parent(s): b373b75

remove tensorflow until model is ready - get space live

Browse files
Files changed (2) hide show
  1. requirements.txt +1 -2
  2. src/streamlit_app.py +4 -9
requirements.txt CHANGED
@@ -1,5 +1,4 @@
1
  streamlit
2
  pandas
3
  numpy
4
- tensorflow-cpu==2.21.0
5
- scipy
 
1
  streamlit
2
  pandas
3
  numpy
4
+ scipy
 
src/streamlit_app.py CHANGED
@@ -35,12 +35,7 @@ EXPLANATIONS = {
35
 
36
  @st.cache_resource
37
  def load_model():
38
- try:
39
- import tensorflow as tf
40
- model = tf.keras.models.load_model("model.keras")
41
- return model
42
- except Exception:
43
- return None
44
 
45
  # ── Page config ─────────────────────────────────────────────────────────────
46
 
@@ -78,9 +73,9 @@ with st.sidebar:
78
 
79
  # ── Model status ─────────────────────────────────────────────────────────────
80
 
81
- model = load_model()
82
 
83
- if model is None:
84
  st.warning(
85
  "⚠️ Model not yet available. "
86
  "The interface is fully built β€” predictions will activate once "
@@ -129,7 +124,7 @@ with tab1:
129
  st.metric("Feature count", len(feature_vector))
130
 
131
  if st.button("πŸ” Classify this sample", type="primary"):
132
- if model is None:
133
  st.error("Model not loaded β€” cannot predict yet.")
134
  else:
135
  arr = feature_vector.reshape(1, -1)
 
35
 
36
  @st.cache_resource
37
  def load_model():
38
+ return None, "no_model"
 
 
 
 
 
39
 
40
  # ── Page config ─────────────────────────────────────────────────────────────
41
 
 
73
 
74
  # ── Model status ─────────────────────────────────────────────────────────────
75
 
76
+ model, model_status = load_model()
77
 
78
+ if model_status == "no_model":
79
  st.warning(
80
  "⚠️ Model not yet available. "
81
  "The interface is fully built β€” predictions will activate once "
 
124
  st.metric("Feature count", len(feature_vector))
125
 
126
  if st.button("πŸ” Classify this sample", type="primary"):
127
+ if model_status == "no_model":
128
  st.error("Model not loaded β€” cannot predict yet.")
129
  else:
130
  arr = feature_vector.reshape(1, -1)