Update app.py
Browse files
app.py
CHANGED
|
@@ -61,16 +61,7 @@ llm = None
|
|
| 61 |
llm_model = None
|
| 62 |
|
| 63 |
def trans(text):
|
| 64 |
-
|
| 65 |
-
model = llm.llama_get_model()
|
| 66 |
-
text = "γγγ«γ‘γ―"
|
| 67 |
-
input_text = f"<2ja>{text}".encode('utf-8')
|
| 68 |
-
tokens = llm.tokenize(input_text)
|
| 69 |
-
print("Tokens:", tokens)
|
| 70 |
-
print(llama_model_decoder_start_token(model))
|
| 71 |
-
initial_tokens = [llm.llama_model_decoder_start_token()]
|
| 72 |
-
print("Initial Tokens:", initial_tokens)
|
| 73 |
-
return text
|
| 74 |
|
| 75 |
|
| 76 |
# γγγΉγγ«θ¨θͺγΏγ°γδ»δΈγγγγ€γεγ«ε€ζ
|
|
@@ -84,7 +75,7 @@ def trans(text):
|
|
| 84 |
bos_token = llm.token_bos()
|
| 85 |
print("BOS Token:", bos_token)
|
| 86 |
initial_tokens = [bos_token]
|
| 87 |
-
initial_tokens = [
|
| 88 |
print("Initial Tokens:", initial_tokens)
|
| 89 |
|
| 90 |
# ηζ
|
|
|
|
| 61 |
llm_model = None
|
| 62 |
|
| 63 |
def trans(text):
|
| 64 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
|
| 67 |
# γγγΉγγ«θ¨θͺγΏγ°γδ»δΈγγγγ€γεγ«ε€ζ
|
|
|
|
| 75 |
bos_token = llm.token_bos()
|
| 76 |
print("BOS Token:", bos_token)
|
| 77 |
initial_tokens = [bos_token]
|
| 78 |
+
initial_tokens = [1]
|
| 79 |
print("Initial Tokens:", initial_tokens)
|
| 80 |
|
| 81 |
# ηζ
|