Update app.py
Browse files
app.py
CHANGED
|
@@ -2,19 +2,10 @@ import gradio as gr
|
|
| 2 |
from gpt4all import GPT4All
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
-
title = "
|
| 6 |
|
| 7 |
description = """
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
🔨 Running on CPU-Basic free hardware. Suggest duplicating this space to run without a queue.
|
| 11 |
-
|
| 12 |
-
Mistral does not support system prompt symbol (such as ```<<SYS>>```) now, input your system prompt in the first message if you need. Learn more: [Guardrailing Mistral 7B](https://docs.mistral.ai/usage/guardrailing).
|
| 13 |
-
"""
|
| 14 |
-
|
| 15 |
-
"""
|
| 16 |
-
[Model From TheBloke/Mistral-7B-Instruct-v0.1-GGUF](https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF)
|
| 17 |
-
[Mistral-instruct-v0.1 System prompt](https://docs.mistral.ai/usage/guardrailing)
|
| 18 |
"""
|
| 19 |
|
| 20 |
model_path = "models"
|
|
@@ -80,22 +71,6 @@ additional_inputs=[
|
|
| 80 |
)
|
| 81 |
]
|
| 82 |
|
| 83 |
-
character = "Sherlock Holmes"
|
| 84 |
-
series = "Arthur Conan Doyle's novel"
|
| 85 |
-
|
| 86 |
-
iface = gr.ChatInterface(
|
| 87 |
-
fn = generater,
|
| 88 |
-
title=title,
|
| 89 |
-
description = description,
|
| 90 |
-
chatbot=chatbot,
|
| 91 |
-
additional_inputs=additional_inputs,
|
| 92 |
-
examples=[
|
| 93 |
-
["Hello there! How are you doing?"],
|
| 94 |
-
["How many hours does it take a man to eat a Helicopter?"],
|
| 95 |
-
["You are a helpful and honest assistant. Always answer as helpfully as possible. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."],
|
| 96 |
-
["I want you to act as a spoken English teacher and improver. I will speak to you in English and you will reply to me in English to practice my spoken English. I want you to strictly correct my grammar mistakes, typos, and factual errors. I want you to ask me a question in your reply. Now let's start practicing, you could ask me a question first. Remember, I want you to strictly correct my grammar mistakes, typos, and factual errors."],
|
| 97 |
-
[f"I want you to act like {character} from {series}. I want you to respond and answer like {character} using the tone, manner and vocabulary {character} would use. Do not write any explanations. Only answer like {character}. You must know all of the knowledge of {character}."]
|
| 98 |
-
]
|
| 99 |
)
|
| 100 |
|
| 101 |
with gr.Blocks(css="resourse/style/custom.css") as demo:
|
|
|
|
| 2 |
from gpt4all import GPT4All
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
| 5 |
+
title = "A N I M A - Biomimicry LLM"
|
| 6 |
|
| 7 |
description = """
|
| 8 |
+
ANIMA (Advanced Nature Inspired Multidisciplinary Assistant) is an expert in various scientific disciplines, including but not limited to biomimicry, biology, and environmental science.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
"""
|
| 10 |
|
| 11 |
model_path = "models"
|
|
|
|
| 71 |
)
|
| 72 |
]
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
)
|
| 75 |
|
| 76 |
with gr.Blocks(css="resourse/style/custom.css") as demo:
|