Spaces:
Runtime error
Runtime error
Update init_save.py
Browse files- init_save.py +5 -1
init_save.py
CHANGED
@@ -4,6 +4,10 @@ import os
|
|
4 |
def initialize_and_save_model(save_path="trained_model"):
|
5 |
config = EvoTransformerConfig()
|
6 |
model = EvoTransformerForClassification(config)
|
7 |
-
|
8 |
os.makedirs(save_path, exist_ok=True)
|
9 |
model.save_pretrained(save_path)
|
|
|
|
|
|
|
|
|
|
|
|
4 |
def initialize_and_save_model(save_path="trained_model"):
|
5 |
config = EvoTransformerConfig()
|
6 |
model = EvoTransformerForClassification(config)
|
|
|
7 |
os.makedirs(save_path, exist_ok=True)
|
8 |
model.save_pretrained(save_path)
|
9 |
+
|
10 |
+
def retrain_model():
|
11 |
+
# Dummy retrain function β replace with actual training logic later
|
12 |
+
initialize_and_save_model("trained_model")
|
13 |
+
return "β
Retrained and saved new model."
|