pminervini commited on
Commit
25e48d1
1 Parent(s): c7d3aec
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -78,7 +78,7 @@ def rag_pipeline(prompt, index="pubmed", num_docs=3, model_name="HuggingFaceH4/z
78
  for message in messages:
79
  print('MSG', message)
80
 
81
- max_new_tokens = 512
82
 
83
  if model_name.startswith('openai/'):
84
  openai_model_name = model_name.split('/')[1]
@@ -107,7 +107,7 @@ def rag_pipeline(prompt, index="pubmed", num_docs=3, model_name="HuggingFaceH4/z
107
 
108
  # Define the generation_kwargs with stopping criteria
109
  generation_kwargs = {
110
- # "max_new_tokens": max_new_tokens,
111
  "generation_kwargs": {"stopping_criteria": stopping_criteria},
112
  "return_full_text": False
113
  }
 
78
  for message in messages:
79
  print('MSG', message)
80
 
81
+ max_new_tokens = 1024
82
 
83
  if model_name.startswith('openai/'):
84
  openai_model_name = model_name.split('/')[1]
 
107
 
108
  # Define the generation_kwargs with stopping criteria
109
  generation_kwargs = {
110
+ "max_new_tokens": max_new_tokens,
111
  "generation_kwargs": {"stopping_criteria": stopping_criteria},
112
  "return_full_text": False
113
  }