try12
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
from langchain import PromptTemplate, LLMChain
|
2 |
from gpt4all import GPT4All
|
3 |
from huggingface_hub import hf_hub_download
|
|
|
4 |
#gpt=GPT4All("ggml-gpt4all-j-v1.3-groovy")
|
5 |
hf_hub_download(repo_id="dnato/ggml-gpt4all-j-v1.3-groovy.bin", filename="ggml-gpt4all-j-v1.3-groovy.bin", local_dir=".")
|
6 |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
|
@@ -13,7 +14,7 @@ Question: {question}
|
|
13 |
|
14 |
Answer:"""
|
15 |
|
16 |
-
local_path="ggml-gpt4all-j-v1.3-groovy.bin"
|
17 |
|
18 |
prompt = PromptTemplate(template=template, input_variables=["question"])
|
19 |
from langchain.llms import GPT4All
|
|
|
1 |
from langchain import PromptTemplate, LLMChain
|
2 |
from gpt4all import GPT4All
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
+
import os
|
5 |
#gpt=GPT4All("ggml-gpt4all-j-v1.3-groovy")
|
6 |
hf_hub_download(repo_id="dnato/ggml-gpt4all-j-v1.3-groovy.bin", filename="ggml-gpt4all-j-v1.3-groovy.bin", local_dir=".")
|
7 |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
|
|
|
14 |
|
15 |
Answer:"""
|
16 |
|
17 |
+
local_path=os.getcwd() + "/ggml-gpt4all-j-v1.3-groovy.bin"
|
18 |
|
19 |
prompt = PromptTemplate(template=template, input_variables=["question"])
|
20 |
from langchain.llms import GPT4All
|