Spaces:
Runtime error
Runtime error
Commit ·
a0d9618
1
Parent(s): e9cd936
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, set_seed, pipeline
|
|
| 4 |
|
| 5 |
tokenizer = AutoTokenizer.from_pretrained("codeparrot/codeparrot-small-code-to-text")
|
| 6 |
model = AutoModelForCausalLM.from_pretrained("codeparrot/codeparrot-small-code-to-text")
|
| 7 |
-
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, num_return_sequences=1, device=
|
| 8 |
|
| 9 |
|
| 10 |
def make_doctring(gen_prompt):
|
|
|
|
| 4 |
|
| 5 |
tokenizer = AutoTokenizer.from_pretrained("codeparrot/codeparrot-small-code-to-text")
|
| 6 |
model = AutoModelForCausalLM.from_pretrained("codeparrot/codeparrot-small-code-to-text")
|
| 7 |
+
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, num_return_sequences=1, device=-1)
|
| 8 |
|
| 9 |
|
| 10 |
def make_doctring(gen_prompt):
|