dwb2023 commited on
Commit
6be117b
1 Parent(s): 0e324a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -20,7 +20,7 @@ def get_file_summary(file_path):
20
  }
21
 
22
  def read_file_content(file_path):
23
- with open(file_path, "r") as file:
24
  return file.read()
25
 
26
  def extract_repo_content(url):
@@ -34,6 +34,8 @@ def extract_repo_content(url):
34
 
35
  extracted_content = []
36
  for root, _, files in os.walk(repo_dir):
 
 
37
  for file in files:
38
  file_path = os.path.join(root, file)
39
  file_summary = get_file_summary(file_path)
 
20
  }
21
 
22
  def read_file_content(file_path):
23
+ with open(file_path, "r", encoding="utf-8", errors="ignore") as file:
24
  return file.read()
25
 
26
  def extract_repo_content(url):
 
34
 
35
  extracted_content = []
36
  for root, _, files in os.walk(repo_dir):
37
+ if '.git' in root:
38
+ continue # Skip the .git directory
39
  for file in files:
40
  file_path = os.path.join(root, file)
41
  file_summary = get_file_summary(file_path)