This commit is contained in:
2023-05-14 09:33:41 +08:00
parent acb4839912
commit d328b31210
4 changed files with 34 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package models
import (
"fmt"
"main/configs"
)
@@ -24,6 +25,26 @@ func init() {
configs.ORMDB().AutoMigrate(&Model{})
}
func (model *Model) Train() (err error) {
if model.Type == "lora" {
fmt.Println("lora")
return
}
if model.Type == "ckp" {
fmt.Println("ckp")
return
}
if model.Type == "hyper" {
fmt.Println("hyper")
return
}
if model.Type == "ti" {
fmt.Println("ti")
return
}
return
}
//func (model *Model) SendToTrain() error {
// db, err := configs.GetDB()
// if err != nil {