Akjava commited on
Commit
4744ae9
Β·
verified Β·
1 Parent(s): ac18c71

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -11
app.py CHANGED
@@ -61,16 +61,7 @@ llm = None
61
  llm_model = None
62
 
63
  def trans(text):
64
- print(llm.llama_get_model())
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 = [0]
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
  # η”Ÿζˆ