Spaces:
Build error
Build error
Commit
·
33c3349
1
Parent(s):
0c1e42b
Update backend/maximally_activating_patches.py
Browse files
backend/maximally_activating_patches.py
CHANGED
@@ -4,14 +4,14 @@ import streamlit as st
|
|
4 |
from backend.load_file import load_json
|
5 |
|
6 |
|
7 |
-
|
8 |
-
st.cache_data
|
9 |
def load_activation(filename):
|
10 |
activation = load_json(filename)
|
11 |
return activation
|
12 |
|
13 |
-
|
14 |
-
@st.cache_data
|
15 |
def load_dataset(data_index):
|
16 |
with open(f'./data/preprocessed_image_net/val_data_{data_index}.pkl', 'rb') as file:
|
17 |
dataset = pickle.load(file)
|
|
|
4 |
from backend.load_file import load_json
|
5 |
|
6 |
|
7 |
+
@st.cache(allow_output_mutation=True)
|
8 |
+
# st.cache_data
|
9 |
def load_activation(filename):
|
10 |
activation = load_json(filename)
|
11 |
return activation
|
12 |
|
13 |
+
@st.cache(allow_output_mutation=True)
|
14 |
+
# @st.cache_data
|
15 |
def load_dataset(data_index):
|
16 |
with open(f'./data/preprocessed_image_net/val_data_{data_index}.pkl', 'rb') as file:
|
17 |
dataset = pickle.load(file)
|