Spaces:
Sleeping
Sleeping
refactored and gave functions more appropiate names
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ import dotenv
|
|
| 27 |
|
| 28 |
import os
|
| 29 |
|
| 30 |
-
from prompt_template import template
|
| 31 |
|
| 32 |
dotenv.load_dotenv()
|
| 33 |
|
|
@@ -38,7 +38,7 @@ text_splitter = CharacterTextSplitter(
|
|
| 38 |
chunk_overlap=0
|
| 39 |
)
|
| 40 |
|
| 41 |
-
#
|
| 42 |
# repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 43 |
# model_kwargs={
|
| 44 |
# "temperature":0.1,
|
|
@@ -46,10 +46,10 @@ text_splitter = CharacterTextSplitter(
|
|
| 46 |
# }
|
| 47 |
# )
|
| 48 |
|
| 49 |
-
#
|
| 50 |
from langchain.chat_models import ChatOpenAI
|
| 51 |
|
| 52 |
-
|
| 53 |
model_name='gpt-3.5-turbo-16k',
|
| 54 |
# temperature = self.config.llm.temperature,
|
| 55 |
# openai_api_key = self.config.llm.openai_api_key,
|
|
|
|
| 27 |
|
| 28 |
import os
|
| 29 |
|
| 30 |
+
from prompt.prompt_template import template
|
| 31 |
|
| 32 |
dotenv.load_dotenv()
|
| 33 |
|
|
|
|
| 38 |
chunk_overlap=0
|
| 39 |
)
|
| 40 |
|
| 41 |
+
# llm= HuggingFaceHub(
|
| 42 |
# repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 43 |
# model_kwargs={
|
| 44 |
# "temperature":0.1,
|
|
|
|
| 46 |
# }
|
| 47 |
# )
|
| 48 |
|
| 49 |
+
# llm= OpenAI()
|
| 50 |
from langchain.chat_models import ChatOpenAI
|
| 51 |
|
| 52 |
+
llm= chat = ChatOpenAI(
|
| 53 |
model_name='gpt-3.5-turbo-16k',
|
| 54 |
# temperature = self.config.llm.temperature,
|
| 55 |
# openai_api_key = self.config.llm.openai_api_key,
|