Spaces:
Sleeping
Sleeping
lets try this
Browse files- .DS_Store +0 -0
- app.py +1 -1
- commitlens.py +7 -16
.DS_Store
CHANGED
|
Binary files a/.DS_Store and b/.DS_Store differ
|
|
|
app.py
CHANGED
|
@@ -288,7 +288,7 @@ def process_repo(repo_url: str, token: str) -> dict:
|
|
| 288 |
Returns: { "files": [{"name": str, "summary": str}], "report": str }
|
| 289 |
"""
|
| 290 |
log.info("=== process_repo: %s ===", repo_url)
|
| 291 |
-
|
| 292 |
# Step 1 — fetch diff and build prompts
|
| 293 |
prompts = run_pipeline(repo_url, token.strip() or None)
|
| 294 |
log.info("Got %d file prompts from pipeline", len(prompts))
|
|
|
|
| 288 |
Returns: { "files": [{"name": str, "summary": str}], "report": str }
|
| 289 |
"""
|
| 290 |
log.info("=== process_repo: %s ===", repo_url)
|
| 291 |
+
_model.to("cuda") # move model to GPU for Mellum inference; stays in GPU until next @spaces.GPU call or app shutdown
|
| 292 |
# Step 1 — fetch diff and build prompts
|
| 293 |
prompts = run_pipeline(repo_url, token.strip() or None)
|
| 294 |
log.info("Got %d file prompts from pipeline", len(prompts))
|
commitlens.py
CHANGED
|
@@ -286,12 +286,6 @@ def build_prompts(ctx: CommitContext) -> list[str]:
|
|
| 286 |
"=== COMMIT METADATA ===\n"
|
| 287 |
f"Message : {ctx.message}\n"
|
| 288 |
f"Author : {ctx.author}\n"
|
| 289 |
-
f"Timestamp : {ctx.timestamp}\n"
|
| 290 |
-
"\n"
|
| 291 |
-
"=== COMMIT STATS ===\n"
|
| 292 |
-
f"Total files changed : {ctx.total_changed_files}\n"
|
| 293 |
-
f"Total additions : {ctx.total_additions}\n"
|
| 294 |
-
f"Total deletions : {ctx.total_deletions}\n"
|
| 295 |
)
|
| 296 |
|
| 297 |
for fc in ctx.files:
|
|
@@ -301,9 +295,6 @@ def build_prompts(ctx: CommitContext) -> list[str]:
|
|
| 301 |
sections.append(
|
| 302 |
"=== FILE ===\n"
|
| 303 |
f"Filename : {fc.filename}\n"
|
| 304 |
-
f"Status : {fc.status}\n"
|
| 305 |
-
f"Additions: {fc.additions}\n"
|
| 306 |
-
f"Deletions: {fc.deletions}\n"
|
| 307 |
)
|
| 308 |
|
| 309 |
# Before content
|
|
@@ -325,13 +316,13 @@ def build_prompts(ctx: CommitContext) -> list[str]:
|
|
| 325 |
sections.append("=== AFTER CODE ===\n(file was deleted)\n")
|
| 326 |
|
| 327 |
# Diff patch
|
| 328 |
-
if fc.patch:
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
else:
|
| 334 |
-
|
| 335 |
|
| 336 |
prompts.append("\n".join(sections))
|
| 337 |
|
|
|
|
| 286 |
"=== COMMIT METADATA ===\n"
|
| 287 |
f"Message : {ctx.message}\n"
|
| 288 |
f"Author : {ctx.author}\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
)
|
| 290 |
|
| 291 |
for fc in ctx.files:
|
|
|
|
| 295 |
sections.append(
|
| 296 |
"=== FILE ===\n"
|
| 297 |
f"Filename : {fc.filename}\n"
|
|
|
|
|
|
|
|
|
|
| 298 |
)
|
| 299 |
|
| 300 |
# Before content
|
|
|
|
| 316 |
sections.append("=== AFTER CODE ===\n(file was deleted)\n")
|
| 317 |
|
| 318 |
# Diff patch
|
| 319 |
+
# if fc.patch:
|
| 320 |
+
# sections.append(
|
| 321 |
+
# "=== DIFF ===\n"
|
| 322 |
+
# f"{fc.patch}\n"
|
| 323 |
+
# )
|
| 324 |
+
# else:
|
| 325 |
+
# sections.append("=== DIFF ===\n(no patch available)\n")
|
| 326 |
|
| 327 |
prompts.append("\n".join(sections))
|
| 328 |
|