Create Model.py
Browse filesSorry for the simplified model.
Model.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import torch,random
|
3 |
+
from transformers import pipeline
|
4 |
+
fill_mask = pipeline("fill-mask")
|
5 |
+
while True:
|
6 |
+
x=input(">")
|
7 |
+
for i in range(42):
|
8 |
+
x+=" <mask>"
|
9 |
+
x=fill_mask(x)[0]["sequence"]
|
10 |
+
print(x)
|