Create train.py
Browse files
train.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
from model import MaestroAssistant
|
| 3 |
+
import pickle
|
| 4 |
+
|
| 5 |
+
def train_and_save():
|
| 6 |
+
assistant = MaestroAssistant()
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
with open('maestro_model.pkl', 'wb') as f:
|
| 10 |
+
pickle.dump(assistant, f)
|
| 11 |
+
|
| 12 |
+
print("Модель Маэстро обучена и сохранена!")
|
| 13 |
+
|
| 14 |
+
if __name__ == "__main__":
|
| 15 |
+
train_and_save()
|