ua
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,9 @@ import (
 | 
			
		||||
 | 
			
		||||
type Session struct {
 | 
			
		||||
	ID        string `json:"id" gorm:"primary_key"`
 | 
			
		||||
	IP        string `json:"ip"`
 | 
			
		||||
	UserID    int    `json:"user_id"`
 | 
			
		||||
	UserAgent string `json:"user_agent"`
 | 
			
		||||
	CreatedAt string `json:"created_at"`
 | 
			
		||||
	UpdatedAt string `json:"updated_at"`
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user