Spaces:
Sleeping
Sleeping
Nguyen Thi Dieu Hien
commited on
Commit
•
f5bec3e
1
Parent(s):
fe0eb61
Update app.py
Browse files
app.py
CHANGED
@@ -26,12 +26,10 @@ from sklearn.model_selection import StratifiedKFold
|
|
26 |
# Evaluate
|
27 |
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
|
28 |
|
29 |
-
|
30 |
-
logging.getLogger('streamlit').setLevel(logging.ERROR)
|
31 |
# Set up the Streamlit page
|
32 |
st.set_page_config(layout='wide')
|
33 |
-
|
34 |
-
st.cache_data.clear()
|
35 |
|
36 |
# Define variables
|
37 |
PREPROCESSED_DATA = "data/val_data_162k.json"
|
@@ -70,7 +68,7 @@ class NewsClassifier(nn.Module):
|
|
70 |
x = self.fc(x)
|
71 |
return x
|
72 |
|
73 |
-
st.cache_data
|
74 |
def load_models(model_type):
|
75 |
models = None
|
76 |
model = None
|
|
|
26 |
# Evaluate
|
27 |
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
|
28 |
|
29 |
+
|
|
|
30 |
# Set up the Streamlit page
|
31 |
st.set_page_config(layout='wide')
|
32 |
+
|
|
|
33 |
|
34 |
# Define variables
|
35 |
PREPROCESSED_DATA = "data/val_data_162k.json"
|
|
|
68 |
x = self.fc(x)
|
69 |
return x
|
70 |
|
71 |
+
@st.cache_data
|
72 |
def load_models(model_type):
|
73 |
models = None
|
74 |
model = None
|