Spaces:
Runtime error
Runtime error
Commit
·
487de19
1
Parent(s):
13cb41d
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,14 +14,14 @@ def text_generate(prompt, generated_txt, top_p=0.8, top_k=100, temperature=1.0,
|
|
| 14 |
json_ = {"inputs": prompt,
|
| 15 |
"parameters":
|
| 16 |
{
|
| 17 |
-
"top_p": top_p,
|
| 18 |
"top_k": top_k,
|
| 19 |
-
"temperature": temperature,
|
| 20 |
"max_new_tokens": 250,
|
| 21 |
"return_full_text": True,
|
| 22 |
"do_sample":True,
|
| 23 |
"num_beams": num_beams,
|
| 24 |
-
"repetition_penalty": repetition_penalty,
|
| 25 |
},
|
| 26 |
"options":
|
| 27 |
{"use_cache": True,
|
|
|
|
| 14 |
json_ = {"inputs": prompt,
|
| 15 |
"parameters":
|
| 16 |
{
|
| 17 |
+
"top_p": float(top_p),
|
| 18 |
"top_k": top_k,
|
| 19 |
+
"temperature": float(temperature),
|
| 20 |
"max_new_tokens": 250,
|
| 21 |
"return_full_text": True,
|
| 22 |
"do_sample":True,
|
| 23 |
"num_beams": num_beams,
|
| 24 |
+
"repetition_penalty": float(repetition_penalty),
|
| 25 |
},
|
| 26 |
"options":
|
| 27 |
{"use_cache": True,
|