captain-awesome
commited on
Commit
•
98f8b95
1
Parent(s):
94701f4
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,8 @@ from langchain.chains.combine_documents import create_stuff_documents_chain
|
|
10 |
from langchain_community.embeddings import HuggingFaceBgeEmbeddings
|
11 |
from langchain_community.llms import CTransformers
|
12 |
from ctransformers import AutoModelForCausalLM
|
|
|
|
|
13 |
# from dotenv import load_dotenv
|
14 |
|
15 |
# load_dotenv()
|
@@ -82,7 +84,7 @@ def get_response(user_input):
|
|
82 |
# lib="avx2", # for CPU
|
83 |
# )
|
84 |
|
85 |
-
llm_model
|
86 |
llm = HuggingFaceHub(
|
87 |
repo_id=llm_model,
|
88 |
model_kwargs={"temperature": temperature, "max_new_tokens": 250, "top_k": top_k}
|
|
|
10 |
from langchain_community.embeddings import HuggingFaceBgeEmbeddings
|
11 |
from langchain_community.llms import CTransformers
|
12 |
from ctransformers import AutoModelForCausalLM
|
13 |
+
from langchain.llms import HuggingFaceHub
|
14 |
+
from transformers import AutoTokenizer
|
15 |
# from dotenv import load_dotenv
|
16 |
|
17 |
# load_dotenv()
|
|
|
84 |
# lib="avx2", # for CPU
|
85 |
# )
|
86 |
|
87 |
+
llm_model = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
|
88 |
llm = HuggingFaceHub(
|
89 |
repo_id=llm_model,
|
90 |
model_kwargs={"temperature": temperature, "max_new_tokens": 250, "top_k": top_k}
|