Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,14 @@ def hermes_model():
|
|
22 |
model = AutoModelForCausalLM.from_pretrained("TheBloke/CapybaraHermes-2.5-Mistral-7B-AWQ", low_cpu_mem_usage=True, device_map="auto")
|
23 |
return model, tokenizer
|
24 |
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
# Function to generate a response from the model
|
28 |
def chat_response(msg_prompt: str) -> str:
|
|
|
22 |
model = AutoModelForCausalLM.from_pretrained("TheBloke/CapybaraHermes-2.5-Mistral-7B-AWQ", low_cpu_mem_usage=True, device_map="auto")
|
23 |
return model, tokenizer
|
24 |
|
25 |
+
|
26 |
+
|
27 |
+
def blender_model():
|
28 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
|
29 |
+
model = AutoModelForCausalLM.from_pretrained("facebook/blenderbot-400M-distill", low_cpu_mem_usage=True, device_map="auto")
|
30 |
+
return model, tokenizer
|
31 |
+
|
32 |
+
model, tokenizer = blender_model()
|
33 |
|
34 |
# Function to generate a response from the model
|
35 |
def chat_response(msg_prompt: str) -> str:
|