Spaces:
Paused
Paused
remove cache
Browse files
app.py
CHANGED
@@ -38,8 +38,8 @@ 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, 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 |
|
45 |
# QA 체인 설정
|
|
|
38 |
# Hugging Face 모델 로드
|
39 |
def load_model():
|
40 |
model_name = "halyn/gemma2-2b-it-finetuned-paperqa" # 텍스트 생성 모델 사용
|
41 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, cache_dir=None, clean_up_tokenization_spaces=False)
|
42 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, cache_dir=None)
|
43 |
return pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=150, temperature=0.1)
|
44 |
|
45 |
# QA 체인 설정
|