Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,10 @@ from langchain.prompts import PromptTemplate
|
|
5 |
# from transformers import pipeline
|
6 |
import transformers
|
7 |
|
8 |
-
model_from_hugging_face = transformers.pipeline("text-generation", model="TheBloke/Llama-2-7B-Chat-GGML")
|
|
|
|
|
|
|
9 |
# # from langchain.llms import CTransformers
|
10 |
# from langchain_community.llms import CTransformers
|
11 |
|
|
|
5 |
# from transformers import pipeline
|
6 |
import transformers
|
7 |
|
8 |
+
# model_from_hugging_face = transformers.pipeline("text-generation", model="TheBloke/Llama-2-7B-Chat-GGML")
|
9 |
+
# Load model directly
|
10 |
+
from transformers import AutoModel
|
11 |
+
model_from_hugging_face = AutoModel.from_pretrained("TheBloke/Llama-2-7B-Chat-GGML")
|
12 |
# # from langchain.llms import CTransformers
|
13 |
# from langchain_community.llms import CTransformers
|
14 |
|