Doron Adler
commited on
Commit
•
dafc966
1
Parent(s):
f4b7889
Removed unused keyargs which caused an error
Browse files
app.py
CHANGED
@@ -25,10 +25,6 @@ def text_generation(input_text = None):
|
|
25 |
temperature=temperature,
|
26 |
do_sample=True,
|
27 |
repetition_penalty=2.0,
|
28 |
-
bos_token='<|startoftext|>',
|
29 |
-
eos_token='<|endoftext|>',
|
30 |
-
pad_token='<|pad|>',
|
31 |
-
unknown_token = '<|unknown|>',
|
32 |
num_return_sequences=1)
|
33 |
parsed_text = generated_text[0]["generated_text"].replace("<|startoftext|>", "").replace("\r","").replace("\n\n", "\n").replace("\t", " ").replace("<|pad|>", " * ").replace("\"\"", "\"")
|
34 |
return parsed_text
|
|
|
25 |
temperature=temperature,
|
26 |
do_sample=True,
|
27 |
repetition_penalty=2.0,
|
|
|
|
|
|
|
|
|
28 |
num_return_sequences=1)
|
29 |
parsed_text = generated_text[0]["generated_text"].replace("<|startoftext|>", "").replace("\r","").replace("\n\n", "\n").replace("\t", " ").replace("<|pad|>", " * ").replace("\"\"", "\"")
|
30 |
return parsed_text
|