Spaces:
Build error
Build error
Update requirements.txt
Browse files- requirements.txt +1 -12
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
import pip
|
| 3 |
import python
|
| 4 |
import pytorch
|
|
@@ -8,15 +8,4 @@ pip install openai
|
|
| 8 |
!pip install transformers datasets
|
| 9 |
pip install torch
|
| 10 |
|
| 11 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 12 |
-
|
| 13 |
-
checkpoint = "Salesforce/codegen-350M-mono"
|
| 14 |
-
model = AutoModelForCausalLM.from_pretrained(checkpoint)
|
| 15 |
-
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
| 16 |
-
|
| 17 |
-
text = "def hello_world():"
|
| 18 |
-
|
| 19 |
-
completion = model.generate(**tokenizer(text, return_tensors="pt"))
|
| 20 |
-
|
| 21 |
-
print(tokenizer.decode(completion[0]))
|
| 22 |
|
|
|
|
| 1 |
+
|
| 2 |
import pip
|
| 3 |
import python
|
| 4 |
import pytorch
|
|
|
|
| 8 |
!pip install transformers datasets
|
| 9 |
pip install torch
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|