Spaces:
Runtime error
Runtime error
Set false the full text result
Browse files
app.py
CHANGED
@@ -36,6 +36,8 @@ class TextGeneration:
|
|
36 |
max_length = len(self.tokenizer(prompt)["input_ids"]) + generation_kwargs["max_length"]
|
37 |
generation_kwargs["max_length"] = max_length
|
38 |
|
|
|
|
|
39 |
return self.generator(
|
40 |
prompt,
|
41 |
**generation_kwargs,
|
|
|
36 |
max_length = len(self.tokenizer(prompt)["input_ids"]) + generation_kwargs["max_length"]
|
37 |
generation_kwargs["max_length"] = max_length
|
38 |
|
39 |
+
generation_kwargs["return_full_text"] = False
|
40 |
+
|
41 |
return self.generator(
|
42 |
prompt,
|
43 |
**generation_kwargs,
|