We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abb7957 commit 0730894Copy full SHA for 0730894
app.py
@@ -6,11 +6,11 @@
6
import plotly.express as px
7
import json
8
import numpy as np
9
-# from functools import lru_cache
+from functools import lru_cache
10
11
# Cache the model loading
12
-@gr.cache
13
-# @lru_cache(maxsize=1)
+# @gr.cache
+@lru_cache(maxsize=1)
14
def load_model():
15
model_path = "MMADS/MoralFoundationsClassifier"
16
model = RobertaForSequenceClassification.from_pretrained(model_path)
0 commit comments