Spaces:
Runtime error
Runtime error
SUPERFIRE777
commited on
Commit
•
f078df3
1
Parent(s):
0f27425
Create nlp.py
Browse files
nlp.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from rwkvstic.load import RWKV
|
2 |
+
# Load the model (supports full path, relative path, and remote paths)
|
3 |
+
model = RWKV("https://huggingface.co/BlinkDL/rwkv-4-pile-3b/resolve/main/RWKV-4-Pile-3B-Instruct-test1-20230124.pth")
|
4 |
+
model.loadContext(newctx=f"I tried to put an apple into a box because it is too small. What is 'it'?")
|
5 |
+
output = model.forward(number=100)["output"]
|
6 |
+
print(output)
|