Update app.py
Browse files
app.py
CHANGED
|
@@ -2,25 +2,21 @@ import gradio as gr
|
|
| 2 |
from gpt4all import GPT4All
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
-
title = "
|
| 6 |
description = """
|
| 7 |
-
|
| 8 |
-
I am here to guide you through the principles of biomimicry, helping you understand
|
| 9 |
-
how nature's designs can inspire innovative solutions. Whether you're a student,
|
| 10 |
-
researcher, or just curious about biomimicry, I'm here to assist you.
|
| 11 |
-
Ask me anything from specific examples in nature, to guidance on applying biomimicry principles in your projects.
|
| 12 |
"""
|
| 13 |
|
| 14 |
-
model_path = "
|
| 15 |
-
model_name = "
|
| 16 |
-
hf_hub_download(repo_id="
|
| 17 |
|
| 18 |
print("Start the model init process")
|
| 19 |
model = model = GPT4All(model_name, model_path, allow_download = True, device="cpu")
|
| 20 |
print("Finish the model init process")
|
| 21 |
|
| 22 |
model.config["promptTemplate"] = "[INST] {0} [/INST]"
|
| 23 |
-
model.config["systemPrompt"] = "
|
| 24 |
model._is_chat_session_activated = True
|
| 25 |
|
| 26 |
max_new_tokens = 2048
|
|
|
|
| 2 |
from gpt4all import GPT4All
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
+
title = "S O L A R"
|
| 6 |
description = """
|
| 7 |
+
Is it really that good? Let's see... (Note: This is a Q4 gguf so thst I can run it on the free cpu. Clone and upgrade for a getter version)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
"""
|
| 9 |
|
| 10 |
+
model_path = "TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF"
|
| 11 |
+
model_name = "solar-10.7b-instruct-v1.0.Q4_0.gguf"
|
| 12 |
+
hf_hub_download(repo_id="TheBloke/SOLAR-10.7B-Instruct-v1.0-GGUF", filename=model_name, local_dir=model_path, local_dir_use_symlinks=True)
|
| 13 |
|
| 14 |
print("Start the model init process")
|
| 15 |
model = model = GPT4All(model_name, model_path, allow_download = True, device="cpu")
|
| 16 |
print("Finish the model init process")
|
| 17 |
|
| 18 |
model.config["promptTemplate"] = "[INST] {0} [/INST]"
|
| 19 |
+
model.config["systemPrompt"] = "You are a helpful assistant named SOLAR."
|
| 20 |
model._is_chat_session_activated = True
|
| 21 |
|
| 22 |
max_new_tokens = 2048
|