Spaces:
Running
Running
Upload model_manager.py
Browse files- model_manager.py +17 -0
model_manager.py
CHANGED
|
@@ -91,6 +91,23 @@ class BitNetManager:
|
|
| 91 |
|
| 92 |
if process.returncode != 0:
|
| 93 |
st.error(f"Setup failed (Exit {process.returncode})")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
return False
|
| 95 |
|
| 96 |
st.success("Official Setup Completed Successfully!")
|
|
|
|
| 91 |
|
| 92 |
if process.returncode != 0:
|
| 93 |
st.error(f"Setup failed (Exit {process.returncode})")
|
| 94 |
+
|
| 95 |
+
# Check for specific logs
|
| 96 |
+
logs_dir = os.path.join(self.bitnet_dir, "logs")
|
| 97 |
+
comp_log = os.path.join(logs_dir, "compile.log")
|
| 98 |
+
down_log = os.path.join(logs_dir, "download_model.log")
|
| 99 |
+
|
| 100 |
+
if os.path.exists(down_log):
|
| 101 |
+
st.info("Download Log (logs/download_model.log):")
|
| 102 |
+
with open(down_log, "r") as f:
|
| 103 |
+
st.code(f.read()[-3000:])
|
| 104 |
+
elif os.path.exists(comp_log):
|
| 105 |
+
st.info("Compilation Log (logs/compile.log):")
|
| 106 |
+
with open(comp_log, "r") as f:
|
| 107 |
+
st.code(f.read()[-3000:])
|
| 108 |
+
else:
|
| 109 |
+
st.info("Detailed Output:")
|
| 110 |
+
st.code(process.stdout[-2000:])
|
| 111 |
return False
|
| 112 |
|
| 113 |
st.success("Official Setup Completed Successfully!")
|