halyn commited on
Commit
7665ac7
1 Parent(s): 91830bb

remove cache and fix warning

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -38,7 +38,7 @@ def create_knowledge_base(chunks):
38
  # Hugging Face 모델 로드
39
  def load_model():
40
  model_name = "halyn/gemma2-2b-it-finetuned-paperqa" # 텍스트 생성 모델 사용
41
- tokenizer = AutoTokenizer.from_pretrained(model_name)
42
  model = AutoModelForCausalLM.from_pretrained(model_name)
43
  return pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=150, temperature=0.1)
44
 
 
38
  # Hugging Face 모델 로드
39
  def load_model():
40
  model_name = "halyn/gemma2-2b-it-finetuned-paperqa" # 텍스트 생성 모델 사용
41
+ tokenizer = AutoTokenizer.from_pretrained(model_name, clean_up_tokenization_spaces=False)
42
  model = AutoModelForCausalLM.from_pretrained(model_name)
43
  return pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=150, temperature=0.1)
44