성현 김 commited on
Commit
712bacb
·
1 Parent(s): 3bb9b7c

Apply pysqlite3-binary patch for ChromaDB sqlite3 version

Browse files
Files changed (2) hide show
  1. app/app.py +11 -0
  2. requirements.txt +2 -3
app/app.py CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  print("<<<<< app.app.py IS BEING LOADED >>>>>")
2
 
3
  # app/app.py
@@ -497,6 +506,8 @@ async def reset_api_memory():
497
  cleared_wiki_history=True
498
  )
499
 
 
 
500
  # 로컬 테스트용 uvicorn 실행 명령어 (실제 Space에서는 Dockerfile의 CMD 사용)
501
  # if __name__ == "__main__":
502
  # import uvicorn
 
1
+ # app/app.py
2
+
3
+ __import__('pysqlite3')
4
+ import sys
5
+ sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
6
+
7
+ print("<<<<< app.app.py IS BEING LOADED (sqlite3 patched with pysqlite3) >>>>>") # 패치 내용 명시
8
+
9
+
10
  print("<<<<< app.app.py IS BEING LOADED >>>>>")
11
 
12
  # app/app.py
 
506
  cleared_wiki_history=True
507
  )
508
 
509
+ print(f"----- FastAPI instance 'app' IS DEFINED in app.app.py, type: {type(app)}, dir: {dir()}")
510
+
511
  # 로컬 테스트용 uvicorn 실행 명령어 (실제 Space에서는 Dockerfile의 CMD 사용)
512
  # if __name__ == "__main__":
513
  # import uvicorn
requirements.txt CHANGED
@@ -13,6 +13,7 @@ langchain
13
  langchain-core
14
  langchain-huggingface
15
  langchain-chroma
 
16
 
17
  # 한국어 처리를 위한 도구
18
  konlpy
@@ -21,6 +22,4 @@ python-dotenv
21
 
22
  # 선택 (모델 특성에 따라)
23
  # sentencepiece # 일부 tokenizer 필요
24
- # bitsandbytes # QLoRA나 8bit 모델 시 필요 (Spaces에서 미지원 가능성 있음)
25
- requests # <--- 테스트를 위해 이 줄을 새로 추가합니다.
26
- # cache_buster_for_pip_install
 
13
  langchain-core
14
  langchain-huggingface
15
  langchain-chroma
16
+ pysqlite3-binary # <--- ChromaDB의 sqlite3 버전 호환성을 위해 추가
17
 
18
  # 한국어 처리를 위한 도구
19
  konlpy
 
22
 
23
  # 선택 (모델 특성에 따라)
24
  # sentencepiece # 일부 tokenizer 필요
25
+ # bitsandbytes # QLoRA나 8bit 모델 시 필요 (Spaces에서 미지원 가능성 있음)