ccm commited on
Commit
dd6ee7e
·
verified ·
1 Parent(s): fce070e

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -28,7 +28,7 @@ EXAMPLE_QUERIES = [
28
  ]
29
  EMBEDDING_MODEL_NAME = "allenai-specter"
30
  LLM_MODEL_NAME = "Qwen/Qwen2-7B-Instruct"
31
-
32
  # Load the dataset and convert to pandas
33
  data = pandas.read_parquet("hf://datasets/ccm/publications/data/train-00000-of-00001.parquet")
34
 
@@ -128,7 +128,7 @@ def reply(message: str, history: list[str]) -> str:
128
  """
129
 
130
  # Apply preprocessing
131
- message, bypass = preprocess(message, 5)
132
 
133
  # This is some handling that is applied to the history variable to put it in a good format
134
  history_transformer_format = [
 
28
  ]
29
  EMBEDDING_MODEL_NAME = "allenai-specter"
30
  LLM_MODEL_NAME = "Qwen/Qwen2-7B-Instruct"
31
+ PUBLICATIONS_TO_RETRIEVE = 3
32
  # Load the dataset and convert to pandas
33
  data = pandas.read_parquet("hf://datasets/ccm/publications/data/train-00000-of-00001.parquet")
34
 
 
128
  """
129
 
130
  # Apply preprocessing
131
+ message, bypass = preprocess(message, PUBLICATIONS_TO_RETRIEVE)
132
 
133
  # This is some handling that is applied to the history variable to put it in a good format
134
  history_transformer_format = [