Spaces:
Runtime error
Runtime error
update app
Browse files
app.py
CHANGED
|
@@ -4,12 +4,12 @@ from transformers import pipeline
|
|
| 4 |
|
| 5 |
|
| 6 |
title = "InCoder Generator"
|
| 7 |
-
description = "This is a subspace to make code generation with InCoder, it is used in a larger space for model comparison."
|
| 8 |
example = [
|
| 9 |
["def print_hello_world():", "Sample", 8, 42],
|
| 10 |
["def get_file_size(filepath):", "Sample", 22, 42]]
|
| 11 |
-
tokenizer = AutoTokenizer.from_pretrained("facebook/incoder-
|
| 12 |
-
model = AutoModelForCausalLM.from_pretrained("facebook/incoder-
|
| 13 |
|
| 14 |
|
| 15 |
def code_generation(gen_prompt, strategy, max_tokens, seed=42):
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
title = "InCoder Generator"
|
| 7 |
+
description = "This is a subspace to make code generation with [InCoder](https://huggingface.co/facebook/incoder-6B), it is used in a larger [space](https://huggingface.co/spaces/loubnabnl/Code-generation-models-v1) for model comparison."
|
| 8 |
example = [
|
| 9 |
["def print_hello_world():", "Sample", 8, 42],
|
| 10 |
["def get_file_size(filepath):", "Sample", 22, 42]]
|
| 11 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/incoder-1B")
|
| 12 |
+
model = AutoModelForCausalLM.from_pretrained("facebook/incoder-1B", low_cpu_mem_usage=True)
|
| 13 |
|
| 14 |
|
| 15 |
def code_generation(gen_prompt, strategy, max_tokens, seed=42):
|