Spaces:
Running
on
Zero
Running
on
Zero
Update app_lora1.py
Browse files- app_lora1.py +7 -1
app_lora1.py
CHANGED
|
@@ -128,11 +128,17 @@ def register_scripts(selected_scripts):
|
|
| 128 |
for name in selected_scripts:
|
| 129 |
path = os.path.join(LOCAL_SCRIPTS_DIR, name)
|
| 130 |
with open(path, "r") as f:
|
| 131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
|
| 133 |
return f"{len(SCRIPT_CODE)} script(s) registered ✅"
|
| 134 |
|
| 135 |
|
|
|
|
| 136 |
# =========================================================
|
| 137 |
# EXTRACT LINES AFTER FROM_PRETRAINED
|
| 138 |
# =========================================================
|
|
|
|
| 128 |
for name in selected_scripts:
|
| 129 |
path = os.path.join(LOCAL_SCRIPTS_DIR, name)
|
| 130 |
with open(path, "r") as f:
|
| 131 |
+
code = f.read()
|
| 132 |
+
SCRIPT_CODE[name] = code
|
| 133 |
+
|
| 134 |
+
# Log the .py file and extract pipe lines
|
| 135 |
+
log(f"=== Registering script: {name} ===")
|
| 136 |
+
extract_pipe_lines(code) # This logs the full script + pipe lines
|
| 137 |
|
| 138 |
return f"{len(SCRIPT_CODE)} script(s) registered ✅"
|
| 139 |
|
| 140 |
|
| 141 |
+
|
| 142 |
# =========================================================
|
| 143 |
# EXTRACT LINES AFTER FROM_PRETRAINED
|
| 144 |
# =========================================================
|