PierreJousselin commited on
Commit
89612ca
·
verified ·
1 Parent(s): 4bbf0b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,12 +17,13 @@ def generate_response(prompt):
17
 
18
  # Ensure the inputs are moved to the CPU
19
  input_ids = inputs["input_ids"].to("cpu")
20
-
21
  # Generate output (ensure it's on CPU)
22
  output = model.generate(input_ids, max_length=150, num_return_sequences=1)
23
 
24
  # Decode and return response
25
  response = tokenizer.decode(output[0], skip_special_tokens=True)
 
26
  return response
27
 
28
  # Create a Gradio interface with a "Generate" button
 
17
 
18
  # Ensure the inputs are moved to the CPU
19
  input_ids = inputs["input_ids"].to("cpu")
20
+ print(input_ids)
21
  # Generate output (ensure it's on CPU)
22
  output = model.generate(input_ids, max_length=150, num_return_sequences=1)
23
 
24
  # Decode and return response
25
  response = tokenizer.decode(output[0], skip_special_tokens=True)
26
+ print(output)
27
  return response
28
 
29
  # Create a Gradio interface with a "Generate" button