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