Spaces:
Runtime error
Runtime error
Commit
·
ba7da0d
1
Parent(s):
0a2b9be
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,12 @@ if button:
|
|
25 |
st.text(progress_text)
|
26 |
|
27 |
# Load the pipeline with progress visualization
|
|
|
|
|
|
|
|
|
28 |
with st.spinner("Loading model..."):
|
29 |
-
pipe =
|
30 |
|
31 |
st.success("Model loaded.")
|
32 |
|
|
|
25 |
st.text(progress_text)
|
26 |
|
27 |
# Load the pipeline with progress visualization
|
28 |
+
@st.cache(hash_funcs={pipeline: lambda _: None}) # Disable hashing for pipeline
|
29 |
+
def cached_load_pipeline():
|
30 |
+
return load_pipeline()
|
31 |
+
|
32 |
with st.spinner("Loading model..."):
|
33 |
+
pipe = cached_load_pipeline()
|
34 |
|
35 |
st.success("Model loaded.")
|
36 |
|