LE Quoc Dat commited on
Commit
6b2d9ae
·
verified ·
1 Parent(s): bb80a5c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -6
README.md CHANGED
@@ -18,7 +18,8 @@ tags:
18
  # FastApply-7B-v1.0
19
 
20
  [Github: kortix-ai/fast-apply](https://github.com/kortix-ai/fast-apply)
21
- [Dataset: Kortix/FastApply-dataset-v1.0](https://huggingface.co/datasets/Kortix/FastApply-dataset-v1.0)
 
22
 
23
  ## Model Details
24
 
@@ -106,15 +107,15 @@ Provide the complete updated code.<|im_end|>
106
  input_text = input_text.format(
107
  original_code=original_code,
108
  update_snippet=update_snippet,
109
- ).strip() + tokenizer.eos_token
110
 
111
  # Generate the response
112
  input_ids = tokenizer.encode(input_text, return_tensors="pt")
113
- output = model.generate(input_ids, max_length=8192)
114
- response = tokenizer.decode(output[0])
 
 
115
 
116
  # Extract the updated code from the response
117
  updated_code = response.split("<updated-code>")[1].split("</updated-code>")[0]
118
-
119
- print(updated_code)
120
  ```
 
18
  # FastApply-7B-v1.0
19
 
20
  [Github: kortix-ai/fast-apply](https://github.com/kortix-ai/fast-apply)
21
+ [Dataset: Kortix/FastApply-dataset-v1.0](https://huggingface.co/datasets/Kortix/FastApply-dataset-v1.0)
22
+ [Try it now on 👉 Google Colab](https://colab.research.google.com/drive/1aBqM8Lqso0Xfgtr75G4LFQivXcChU_36?usp=sharing)
23
 
24
  ## Model Details
25
 
 
107
  input_text = input_text.format(
108
  original_code=original_code,
109
  update_snippet=update_snippet,
110
+ ).strip()
111
 
112
  # Generate the response
113
  input_ids = tokenizer.encode(input_text, return_tensors="pt")
114
+ output = model.generate(input_ids, max_length=8192,)
115
+
116
+ response = tokenizer.decode(output[0][len(input_ids[0]):])
117
+ print(response)
118
 
119
  # Extract the updated code from the response
120
  updated_code = response.split("<updated-code>")[1].split("</updated-code>")[0]
 
 
121
  ```