Spaces:
Sleeping
Sleeping
Pratik Dwivedi
commited on
Commit
·
ffb03cb
1
Parent(s):
9bf230a
prints
Browse files
app.py
CHANGED
@@ -25,8 +25,6 @@ def register_gguf_model():
|
|
25 |
hf_repo_name = "TheBloke/Mistral-7B-Instruct-v0.2-GGUF"
|
26 |
model_file = "mistral-7b-instruct-v0.2.Q4_K_M.gguf"
|
27 |
prompter.model_catalog.register_gguf_model(your_model_name,hf_repo_name, model_file, prompt_wrapper="open_chat")
|
28 |
-
# print("loading model")
|
29 |
-
# prompter.load_model(your_model_name)
|
30 |
return prompter
|
31 |
|
32 |
def main():
|
@@ -38,7 +36,7 @@ def main():
|
|
38 |
|
39 |
# keep the select box to llama as default but give a button right below it that says select model after which the model will be loaded
|
40 |
st.sidebar.subheader("Select Model")
|
41 |
-
model_name = st.sidebar.selectbox("Select Model", ["
|
42 |
with st.spinner("Loading Model..."):
|
43 |
prompter.load_model(model_name)
|
44 |
st.success("Model Loaded!")
|
@@ -63,6 +61,5 @@ def main():
|
|
63 |
st.write(re.sub("[\n]"," ", response["llm_response"]).strip())
|
64 |
st.success("Response generated!")
|
65 |
|
66 |
-
|
67 |
if __name__ == "__main__":
|
68 |
main()
|
|
|
25 |
hf_repo_name = "TheBloke/Mistral-7B-Instruct-v0.2-GGUF"
|
26 |
model_file = "mistral-7b-instruct-v0.2.Q4_K_M.gguf"
|
27 |
prompter.model_catalog.register_gguf_model(your_model_name,hf_repo_name, model_file, prompt_wrapper="open_chat")
|
|
|
|
|
28 |
return prompter
|
29 |
|
30 |
def main():
|
|
|
36 |
|
37 |
# keep the select box to llama as default but give a button right below it that says select model after which the model will be loaded
|
38 |
st.sidebar.subheader("Select Model")
|
39 |
+
model_name = st.sidebar.selectbox("Select Model", ["llama", "open_gpt4", "mistral", "phi2"])
|
40 |
with st.spinner("Loading Model..."):
|
41 |
prompter.load_model(model_name)
|
42 |
st.success("Model Loaded!")
|
|
|
61 |
st.write(re.sub("[\n]"," ", response["llm_response"]).strip())
|
62 |
st.success("Response generated!")
|
63 |
|
|
|
64 |
if __name__ == "__main__":
|
65 |
main()
|