codys12 commited on
Commit
641bfc8
1 Parent(s): 36ff73f
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -48,7 +48,10 @@ def generate(
48
  device = "cuda"
49
  print(current_input)
50
  input_ids = tokenizer(current_input, return_tensors="pt").input_ids.to(device)
51
- original_input_length = input_ids.shape[1] # Remember the input length
 
 
 
52
 
53
 
54
  if len(input_ids) > MAX_INPUT_TOKEN_LENGTH:
 
48
  device = "cuda"
49
  print(current_input)
50
  input_ids = tokenizer(current_input, return_tensors="pt").input_ids.to(device)
51
+
52
+ outputs = model.generate(**inputs, max_new_tokens=100)
53
+
54
+ print(tokenizer.decode(outputs[0], skip_special_tokens=False))
55
 
56
 
57
  if len(input_ids) > MAX_INPUT_TOKEN_LENGTH: