Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ elif context == "New Context":
|
|
66 |
selected_context = context_3
|
67 |
selected_question = st.text_area("New Question", value="", height=64)
|
68 |
|
69 |
-
@st.
|
70 |
def setModel(model_checkpoint):
|
71 |
model = AutoModelForQuestionAnswering.from_pretrained(model_checkpoint)
|
72 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
|
|
66 |
selected_context = context_3
|
67 |
selected_question = st.text_area("New Question", value="", height=64)
|
68 |
|
69 |
+
@st.cache_resource(allow_output_mutation=True)
|
70 |
def setModel(model_checkpoint):
|
71 |
model = AutoModelForQuestionAnswering.from_pretrained(model_checkpoint)
|
72 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|