Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ import gradio as gr
|
|
3 |
from ctransformers import AutoModelForCausalLM
|
4 |
|
5 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
6 |
-
|
7 |
-
|
8 |
|
9 |
def generate_response(message):
|
10 |
response = llm(message)
|
|
|
3 |
from ctransformers import AutoModelForCausalLM
|
4 |
|
5 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
6 |
+
llm = AutoModelForCausalLM.from_pretrained("TheBloke/WizardLM-7B-uncensored-GGUF", model_file="WizardLM-7B-uncensored.Q4_K_M.gguf", model_type="llama", gpu_layers=50)
|
7 |
+
|
8 |
|
9 |
def generate_response(message):
|
10 |
response = llm(message)
|