Spaces:
Runtime error
Runtime error
Commit Β·
1dbcfba
1
Parent(s): a735d0a
changing ai model
Browse files- modules/llm.py +2 -2
modules/llm.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from transformers import pipeline
|
| 2 |
|
| 3 |
-
# Load a Hugging Face instruct model
|
| 4 |
-
llm_pipeline = pipeline("text-generation", model="mistralai/
|
| 5 |
|
| 6 |
def ask_llm(prompt):
|
| 7 |
response = llm_pipeline(prompt, return_full_text=False)
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
|
| 3 |
+
# Load a smaller Hugging Face instruct model
|
| 4 |
+
llm_pipeline = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.2", device=0, max_length=512)
|
| 5 |
|
| 6 |
def ask_llm(prompt):
|
| 7 |
response = llm_pipeline(prompt, return_full_text=False)
|