Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import subprocess
|
|
11 |
from huggingface_hub import hf_hub_download
|
12 |
|
13 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
14 |
-
model = AutoModelForCausalLM.from_pretrained("TheBloke/Mistral-7B-
|
15 |
ins = '''[INST] <<FRIDAY>>
|
16 |
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
|
17 |
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.
|
@@ -100,7 +100,7 @@ seafoam = SeafoamCustom()
|
|
100 |
with gr.Blocks(theme=seafoam, analytics_enabled=False, css=css) as demo:
|
101 |
with gr.Column():
|
102 |
gr.Markdown(
|
103 |
-
""" ##
|
104 |
|
105 |
Type in the box below and click the button to generate answers to your most pressing questions!
|
106 |
|
@@ -119,7 +119,7 @@ with gr.Blocks(theme=seafoam, analytics_enabled=False, css=css) as demo:
|
|
119 |
gr.Examples(
|
120 |
examples=examples,
|
121 |
inputs=[instruction],
|
122 |
-
cache_examples=
|
123 |
fn=process_example,
|
124 |
outputs=[output],
|
125 |
)
|
|
|
11 |
from huggingface_hub import hf_hub_download
|
12 |
|
13 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
14 |
+
model = AutoModelForCausalLM.from_pretrained("TheBloke/Mistral-7B-OpenOrca-GGUF", model_file="mistral-7b-openorca.Q3_K_L.gguf", model_type="mistral", gpu_layers=0)
|
15 |
ins = '''[INST] <<FRIDAY>>
|
16 |
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
|
17 |
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.
|
|
|
100 |
with gr.Blocks(theme=seafoam, analytics_enabled=False, css=css) as demo:
|
101 |
with gr.Column():
|
102 |
gr.Markdown(
|
103 |
+
""" ## Shi-Ci Extensional Analyzer
|
104 |
|
105 |
Type in the box below and click the button to generate answers to your most pressing questions!
|
106 |
|
|
|
119 |
gr.Examples(
|
120 |
examples=examples,
|
121 |
inputs=[instruction],
|
122 |
+
cache_examples=False,
|
123 |
fn=process_example,
|
124 |
outputs=[output],
|
125 |
)
|