Update app.py
Browse files
app.py
CHANGED
@@ -99,12 +99,13 @@ def vicuna_model():
|
|
99 |
return model, tokenizer
|
100 |
|
101 |
def hermes_model():
|
102 |
-
|
103 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
104 |
-
model = AutoModelForCausalLM.from_pretrained(
|
105 |
|
106 |
return model, tokenizer
|
107 |
|
|
|
108 |
model, tokenizer = hermes_model()
|
109 |
|
110 |
def hermes_generate_response(msg_prompt: str) -> dict:
|
|
|
99 |
return model, tokenizer
|
100 |
|
101 |
def hermes_model():
|
102 |
+
|
103 |
+
tokenizer = AutoTokenizer.from_pretrained("TheBloke/CapybaraHermes-2.5-Mistral-7B-AWQ")
|
104 |
+
model = AutoModelForCausalLM.from_pretrained("TheBloke/CapybaraHermes-2.5-Mistral-7B-AWQ",low_cpu_mem_usage=True,device_map="auto")
|
105 |
|
106 |
return model, tokenizer
|
107 |
|
108 |
+
|
109 |
model, tokenizer = hermes_model()
|
110 |
|
111 |
def hermes_generate_response(msg_prompt: str) -> dict:
|