omkar56 commited on
Commit
cece2a6
1 Parent(s): 46061bd

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -66,6 +66,6 @@ def generate_text(
66
  # repetition_penalty = body.get("repetition_penalty", 1.0)
67
  history = [] # You might need to handle this based on your actual usage
68
  generatedOutput = generater(message, history, temperature, top_p, top_k)
69
- actualText = generatedOutput[len(generatedOutput) - 1]
70
 
71
  return {"generated_text": actualText}
 
66
  # repetition_penalty = body.get("repetition_penalty", 1.0)
67
  history = [] # You might need to handle this based on your actual usage
68
  generatedOutput = generater(message, history, temperature, top_p, top_k)
69
+ actualText = list(generatedOutput)[-1]
70
 
71
  return {"generated_text": actualText}