whitead commited on
Commit
5d090c0
1 Parent(s): 0cfa8fe

Added more pricing guards

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -96,8 +96,8 @@ def download_repo(gh_repo, data, openai_api_key, pbar=gr.Progress()):
96
  text = z.read(f).decode('utf-8')
97
  except UnicodeDecodeError:
98
  continue
99
- # check if it's bigger than 1MB or smaller than 10 bytes
100
- if len(text) > 1e6 or len(text) < 10:
101
  continue
102
  # have to save to temporary file so we have a path
103
  with tempfile.NamedTemporaryFile(delete=False) as tmp:
 
96
  text = z.read(f).decode('utf-8')
97
  except UnicodeDecodeError:
98
  continue
99
+ # check if it's bigger than 100kb or smaller than 10 bytes
100
+ if len(text) > 1e5 or len(text) < 10:
101
  continue
102
  # have to save to temporary file so we have a path
103
  with tempfile.NamedTemporaryFile(delete=False) as tmp: