Replace cache_resource with cache
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def typical_sampling(model, input_ids, attention_mask, no_repeat_ngram_size, max
|
|
26 |
)
|
27 |
|
28 |
|
29 |
-
@st.
|
30 |
def setModel():
|
31 |
model = AutoModelForCausalLM.from_pretrained(MODEL)
|
32 |
tokenizer = AutoTokenizer.from_pretrained(TOKENIZER)
|
|
|
26 |
)
|
27 |
|
28 |
|
29 |
+
@st.cache(allow_output_mutation=True)
|
30 |
def setModel():
|
31 |
model = AutoModelForCausalLM.from_pretrained(MODEL)
|
32 |
tokenizer = AutoTokenizer.from_pretrained(TOKENIZER)
|