Hemasagar commited on
Commit
9aca64d
1 Parent(s): 6938145

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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