Spaces:
Runtime error
Runtime error
Update main.py
Browse files
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 =
|
| 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}
|