Skip to content

Commit

Permalink
Add encoding to PRELUDE reading
Browse files Browse the repository at this point in the history
  • Loading branch information
ranok authored May 9, 2024
1 parent f8fd3f4 commit a4a89ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zippy/zippy.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def clean_text(s : str) -> str:

# The prelude file is a text file containing only AI-generated text, it is used to 'seed' the LZMA dictionary
PRELUDE_FILE : str = 'ai-generated.txt'
PRELUDE_STR = clean_text(files('zippy').joinpath(PRELUDE_FILE).read_text())
PRELUDE_STR = clean_text(files('zippy').joinpath(PRELUDE_FILE).read_text(encoding='utf-8'))

class AIDetector(ABC):
'''
Expand Down

0 comments on commit a4a89ce

Please sign in to comment.