Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,8 +6,12 @@ tokenizer = LlamaTokenizer.from_pretrained("llama_tokenizer")
|
|
| 6 |
|
| 7 |
def tokenize(input_text, file=None):
|
| 8 |
if file:
|
|
|
|
|
|
|
| 9 |
# Use the file's content directly
|
| 10 |
full_text = file.read().decode("utf-8")
|
|
|
|
|
|
|
| 11 |
else:
|
| 12 |
full_text = input_text
|
| 13 |
|
|
|
|
| 6 |
|
| 7 |
def tokenize(input_text, file=None):
|
| 8 |
if file:
|
| 9 |
+
print(type(file))
|
| 10 |
+
print(len(file))
|
| 11 |
# Use the file's content directly
|
| 12 |
full_text = file.read().decode("utf-8")
|
| 13 |
+
print(type(full_text))
|
| 14 |
+
print(len(full_text))
|
| 15 |
else:
|
| 16 |
full_text = input_text
|
| 17 |
|