Update app.py
Browse files
app.py
CHANGED
|
@@ -78,21 +78,21 @@ def retriever(query):
|
|
| 78 |
|
| 79 |
"""Chain"""
|
| 80 |
|
| 81 |
-
from langchain_core.runnables.passthrough import RunnablePassthrough
|
| 82 |
-
from langchain.prompts import ChatPromptTemplate
|
| 83 |
-
from langchain_core.output_parsers.string import StrOutputParser
|
| 84 |
from langchain_community.llms.huggingface_hub import HuggingFaceHub
|
| 85 |
-
import os
|
| 86 |
-
from langchain_core.runnables import RunnableLambda
|
| 87 |
|
| 88 |
|
| 89 |
#prompt_template = ChatPromptTemplate.from_template(prompt)
|
| 90 |
llm = HuggingFaceHub(
|
| 91 |
-
|
| 92 |
-
repo_id="google-bert/bert-base-uncased",
|
| 93 |
model_kwargs={
|
| 94 |
"temperature": 0.1,
|
| 95 |
-
"max_length":
|
| 96 |
"return_full_text": False
|
| 97 |
}
|
| 98 |
)
|
|
|
|
| 78 |
|
| 79 |
"""Chain"""
|
| 80 |
|
| 81 |
+
#from langchain_core.runnables.passthrough import RunnablePassthrough
|
| 82 |
+
#from langchain.prompts import ChatPromptTemplate
|
| 83 |
+
#from langchain_core.output_parsers.string import StrOutputParser
|
| 84 |
from langchain_community.llms.huggingface_hub import HuggingFaceHub
|
| 85 |
+
#=import os
|
| 86 |
+
#from langchain_core.runnables import RunnableLambda
|
| 87 |
|
| 88 |
|
| 89 |
#prompt_template = ChatPromptTemplate.from_template(prompt)
|
| 90 |
llm = HuggingFaceHub(
|
| 91 |
+
#=repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 92 |
+
#repo_id="google-bert/bert-base-uncased",
|
| 93 |
model_kwargs={
|
| 94 |
"temperature": 0.1,
|
| 95 |
+
"max_length": 1,
|
| 96 |
"return_full_text": False
|
| 97 |
}
|
| 98 |
)
|