Update app.py
Browse files
app.py
CHANGED
@@ -61,6 +61,13 @@ llm = None
|
|
61 |
llm_model = None
|
62 |
|
63 |
def trans(text):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
llama = llm
|
65 |
text = f"<2ja>{text}".encode()
|
66 |
tokens = llama.tokenize(text)
|
|
|
61 |
llm_model = None
|
62 |
|
63 |
def trans(text):
|
64 |
+
text = "こんにちは"
|
65 |
+
input_text = f"<2ja>{text}"
|
66 |
+
tokens = llm.tokenize(input_text)
|
67 |
+
print("Tokens:", tokens)
|
68 |
+
initial_tokens = [llm.decoder_start_token()]
|
69 |
+
print("Initial Tokens:", initial_tokens)
|
70 |
+
return text
|
71 |
llama = llm
|
72 |
text = f"<2ja>{text}".encode()
|
73 |
tokens = llama.tokenize(text)
|