thugCodeNinja commited on
Commit
649e2fb
·
verified ·
1 Parent(s): b91ad23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def process_text(input_text, input_file):
14
  if input_text:
15
  text = input_text
16
  elif input_file is not None:
17
- text = input_file.read().decode('utf-8')
18
  inputs = tokenizer(text, return_tensors="pt")
19
  with torch.no_grad():
20
  logits = model(**inputs).logits
 
14
  if input_text:
15
  text = input_text
16
  elif input_file is not None:
17
+ text = input_file
18
  inputs = tokenizer(text, return_tensors="pt")
19
  with torch.no_grad():
20
  logits = model(**inputs).logits