Spaces:
Running on Zero
Running on Zero
final change
Browse files- .DS_Store +0 -0
- app.py +1 -1
- commitlens.py +17 -17
.DS_Store
CHANGED
|
Binary files a/.DS_Store and b/.DS_Store differ
|
|
|
app.py
CHANGED
|
@@ -166,7 +166,7 @@ def _generate_sequential(prompts: list[str]) -> list[str]:
|
|
| 166 |
with torch.no_grad():
|
| 167 |
out = _model.generate(
|
| 168 |
**enc,
|
| 169 |
-
max_new_tokens=
|
| 170 |
use_cache=True,
|
| 171 |
do_sample=True,
|
| 172 |
temperature=0.4,
|
|
|
|
| 166 |
with torch.no_grad():
|
| 167 |
out = _model.generate(
|
| 168 |
**enc,
|
| 169 |
+
max_new_tokens=200,
|
| 170 |
use_cache=True,
|
| 171 |
do_sample=True,
|
| 172 |
temperature=0.4,
|
commitlens.py
CHANGED
|
@@ -304,23 +304,23 @@ def build_prompts(ctx: CommitContext) -> list[str]:
|
|
| 304 |
f"Filename : {fc.filename}\n"
|
| 305 |
)
|
| 306 |
|
| 307 |
-
# Before content
|
| 308 |
-
if fc.before_content is not None:
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
else:
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
# After content
|
| 317 |
-
if fc.after_content is not None:
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
else:
|
| 323 |
-
|
| 324 |
|
| 325 |
# Diff patch
|
| 326 |
if fc.patch:
|
|
|
|
| 304 |
f"Filename : {fc.filename}\n"
|
| 305 |
)
|
| 306 |
|
| 307 |
+
# # Before content
|
| 308 |
+
# if fc.before_content is not None:
|
| 309 |
+
# sections.append(
|
| 310 |
+
# "=== BEFORE CODE ===\n"
|
| 311 |
+
# f"{fc.before_content}\n"
|
| 312 |
+
# )
|
| 313 |
+
# else:
|
| 314 |
+
# sections.append("=== BEFORE CODE ===\n(file did not exist)\n")
|
| 315 |
+
|
| 316 |
+
# # After content
|
| 317 |
+
# if fc.after_content is not None:
|
| 318 |
+
# sections.append(
|
| 319 |
+
# "=== AFTER CODE ===\n"
|
| 320 |
+
# f"{fc.after_content}\n"
|
| 321 |
+
# )
|
| 322 |
+
# else:
|
| 323 |
+
# sections.append("=== AFTER CODE ===\n(file was deleted)\n")
|
| 324 |
|
| 325 |
# Diff patch
|
| 326 |
if fc.patch:
|