Skip to content

Commit 0730894

Browse files
committed
fixed the cache issue
1 parent abb7957 commit 0730894

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import plotly.express as px
77
import json
88
import numpy as np
9-
# from functools import lru_cache
9+
from functools import lru_cache
1010

1111
# Cache the model loading
12-
@gr.cache
13-
# @lru_cache(maxsize=1)
12+
# @gr.cache
13+
@lru_cache(maxsize=1)
1414
def load_model():
1515
model_path = "MMADS/MoralFoundationsClassifier"
1616
model = RobertaForSequenceClassification.from_pretrained(model_path)

0 commit comments

Comments
 (0)