gufett0 commited on
Commit
6224872
1 Parent(s): 1a9f6cd
Files changed (2) hide show
  1. backend.py +2 -2
  2. requirements.txt +1 -1
backend.py CHANGED
@@ -63,7 +63,7 @@ os.environ['TOKENIZERS_PARALLELISM'] = 'false'
63
  llm = HuggingFaceLLM(
64
  context_window=4096,
65
  max_new_tokens=256,
66
- generate_kwargs={"temperature": 0.1, "do_sample": True},
67
  system_prompt=system_prompt,
68
  tokenizer_name="meta-llama/Llama-2-7b-chat-hf",
69
  model_name="meta-llama/Llama-2-7b-chat-hf",
@@ -199,7 +199,7 @@ def handle_query(query_str: str,
199
  verbose=False,
200
  )"""
201
 
202
-
203
  chat_engine = index.as_chat_engine(
204
  chat_mode="context",
205
  similarity_top_k=3,
 
63
  llm = HuggingFaceLLM(
64
  context_window=4096,
65
  max_new_tokens=256,
66
+ generate_kwargs={"temperature": 0.0, "do_sample": False},
67
  system_prompt=system_prompt,
68
  tokenizer_name="meta-llama/Llama-2-7b-chat-hf",
69
  model_name="meta-llama/Llama-2-7b-chat-hf",
 
199
  verbose=False,
200
  )"""
201
 
202
+ gr.Info("chat engine..")
203
  chat_engine = index.as_chat_engine(
204
  chat_mode="context",
205
  similarity_top_k=3,
requirements.txt CHANGED
@@ -14,7 +14,7 @@ pypdf
14
  langchain>=0.2.3
15
  langchain-community
16
  langchain-huggingface
17
- bitsandbytes-cuda117
18
  accelerate
19
  gradio
20
  spaces
 
14
  langchain>=0.2.3
15
  langchain-community
16
  langchain-huggingface
17
+ bitsandbytes
18
  accelerate
19
  gradio
20
  spaces