Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -64,11 +64,16 @@ def get_answer(chatbot, input_text):
|
|
64 |
output += f"\nAnswered in {elapsed_time:.1f} seconds, Nr generated words: {count_words(output)}"
|
65 |
|
66 |
return output
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
-
chatbot = generate_with_llama_chat(my_config)
|
70 |
text = st.text_area("Enter text to summarize here.")
|
71 |
|
72 |
if text:
|
73 |
-
out = get_answer(
|
74 |
st.write(out)
|
|
|
64 |
output += f"\nAnswered in {elapsed_time:.1f} seconds, Nr generated words: {count_words(output)}"
|
65 |
|
66 |
return output
|
67 |
+
|
68 |
+
if "model_name" not in st.session_state.keys():
|
69 |
+
# Initialize the model with the default option
|
70 |
+
st.session_state["model_name"] = "BramVanroy/Llama-2-13b-chat-dutch"
|
71 |
+
my_config.update({'model_name': st.session_state["model_name"]})
|
72 |
+
llm_chatbot = generate_with_llama_dutch(my_config)
|
73 |
+
st.session_state["model"] = llm_chatbot
|
74 |
|
|
|
75 |
text = st.text_area("Enter text to summarize here.")
|
76 |
|
77 |
if text:
|
78 |
+
out = get_answer(llm_chatbot, text)
|
79 |
st.write(out)
|