Commit
•
b01e61c
1
Parent(s):
db38af6
Update app.py
Browse files
app.py
CHANGED
@@ -30,10 +30,12 @@ def run_inference(
|
|
30 |
|
31 |
text = list(model.sample(1))[0]
|
32 |
|
|
|
33 |
text = text.split(tokenizer.eos_token)[0]
|
34 |
text = text.replace(tokenizer.pad_token, "")
|
35 |
text = text.strip()
|
36 |
|
|
|
37 |
return text
|
38 |
|
39 |
|
|
|
30 |
|
31 |
text = list(model.sample(1))[0]
|
32 |
|
33 |
+
text = text.replace(prefix+prompt,"")
|
34 |
text = text.split(tokenizer.eos_token)[0]
|
35 |
text = text.replace(tokenizer.pad_token, "")
|
36 |
text = text.strip()
|
37 |
|
38 |
+
|
39 |
return text
|
40 |
|
41 |
|