LE Quoc Dat
commited on
Update README.md
Browse files
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()
|
| 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 |
-
|
|
|
|
|
|
|
| 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 |
```
|