teragron commited on
Commit
224703e
·
1 Parent(s): d7e6525

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  from transformers import LlamaTokenizer
3
 
@@ -6,7 +7,7 @@ tokenizer = LlamaTokenizer.from_pretrained("llama_tokenizer")
6
 
7
  def tokenize(input_text, file=None):
8
  if file:
9
- full_text = file.read().decode("utf-8")
10
  else:
11
  full_text = input_text
12
 
 
1
+ import json
2
  import gradio as gr
3
  from transformers import LlamaTokenizer
4
 
 
7
 
8
  def tokenize(input_text, file=None):
9
  if file:
10
+ full_text = json.loads(file.decode('utf-8'))
11
  else:
12
  full_text = input_text
13