kimrang commited on
Commit
71d7cd2
·
verified ·
1 Parent(s): 806f71e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +40 -0
app.py CHANGED
@@ -13,6 +13,46 @@ GROQ_API_KEY = os.environ.get("GROQ_API_KEY")
13
  vectorstores = {}
14
  embeddings = None
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  def find_vectorstore_folders():
17
  """현재 디렉토리에서 벡터스토어 폴더들을 찾는 함수"""
18
  current_dir = os.getcwd()
 
13
  vectorstores = {}
14
  embeddings = None
15
 
16
+ def debug_file_system():
17
+ """파일 시스템 상태를 자세히 확인하는 함수"""
18
+ import os
19
+ print("=" * 50)
20
+ print("🔍 파일 시스템 디버깅 시작")
21
+ print("=" * 50)
22
+
23
+ # 현재 디렉토리
24
+ current_dir = os.getcwd()
25
+ print(f"📂 현재 작업 디렉토리: {current_dir}")
26
+
27
+ # 루트 디렉토리의 모든 항목
28
+ try:
29
+ all_items = os.listdir('.')
30
+ print(f"📋 루트 디렉토리 내용: {all_items}")
31
+
32
+ # 각 항목의 타입 확인
33
+ for item in all_items:
34
+ item_path = os.path.join('.', item)
35
+ if os.path.isdir(item_path):
36
+ print(f"📁 {item} (디렉토리)")
37
+ try:
38
+ sub_items = os.listdir(item_path)
39
+ print(f" └── 내용: {sub_items}")
40
+ except Exception as e:
41
+ print(f" └── 접근 불가: {e}")
42
+ else:
43
+ print(f"📄 {item} (파일)")
44
+
45
+ except Exception as e:
46
+ print(f"❌ 디렉토리 읽기 오류: {e}")
47
+
48
+ # 환경 변수 확인
49
+ print(f"🔑 GROQ_API_KEY 설정됨: {'GROQ_API_KEY' in os.environ}")
50
+
51
+ print("=" * 50)
52
+
53
+ # 앱 시작 시 디버깅 실행
54
+ debug_file_system()
55
+
56
  def find_vectorstore_folders():
57
  """현재 디렉토리에서 벡터스토어 폴더들을 찾는 함수"""
58
  current_dir = os.getcwd()