-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.mojo
29 lines (26 loc) · 967 Bytes
/
main.mojo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# main.mojo
import sys
from operatio import download_model, extract_task_vector, apply_task_vector, full_pipeline
fn main() raises:
var args = sys.argv()
if len(args) < 2:
print("Please specify the operation to perform. Choices include:")
print("- download: Download and save model weights")
print("- extract: Extract task vector from two models")
print("- apply: Apply task vector to a model")
print("- full: Perform full pipeline (download, extract, apply)")
return
var operation = String(args[1])
try:
if operation == "download":
download_model()
elif operation == "extract":
extract_task_vector()
elif operation == "apply":
apply_task_vector()
elif operation == "full":
full_pipeline()
else:
raise Error("Unrecognized operation: " + operation)
except e:
print("Operation failed: ", e)