Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 =
|
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 |
|