Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ def detect_encoding(file):
13
  raw_data = file.read()
14
  result = chardet.detect(raw_data)
15
  encoding = result.get('encoding') or 'utf-8' # Default to UTF-8 if detection fails
16
- file.seek(0) # Reset file pointer for reading
17
  return encoding
18
 
19
  def extract_text(file, filename, encoding):
 
13
  raw_data = file.read()
14
  result = chardet.detect(raw_data)
15
  encoding = result.get('encoding') or 'utf-8' # Default to UTF-8 if detection fails
16
+ file.seek(0)
17
  return encoding
18
 
19
  def extract_text(file, filename, encoding):