acecalisto3 commited on
Commit
dd18a5c
·
verified ·
1 Parent(s): 66c98f0

Delete gemmacode

Browse files
Files changed (2) hide show
  1. gemmacode/init.py +0 -1
  2. gemmacode/utils.py +0 -19
gemmacode/init.py DELETED
@@ -1 +0,0 @@
1
- from .code_generator import generate
 
 
gemmacode/utils.py DELETED
@@ -1,19 +0,0 @@
1
- import torch
2
-
3
- def generate_code(model, tokenizer, idea):
4
- input_text = f"""
5
- # Idea: {idea}
6
-
7
- # Code:
8
- """
9
- input_ids = tokenizer.encode(input_text, return_tensors="pt")
10
- output_sequences = model.generate(
11
- input_ids=input_ids,
12
- max_length=1024,
13
- num_return_sequences=1,
14
- no_repeat_ngram_size=2,
15
- early_stopping=True,
16
- )
17
- generated_code = tokenizer.decode(output_sequences[0], skip_special_tokens=True)
18
-
19
- return generated_code