| 714 | } |
| 715 | |
| 716 | func (m *AppModel) startPushModel(modelName string) tea.Cmd { |
| 717 | logging.InfoLogger.Printf("Pushing model: %s\n", modelName) |
| 718 | return func() tea.Msg { |
| 719 | ctx := context.Background() |
| 720 | req := &api.PushRequest{Name: modelName} |
| 721 | err := m.client.Push(ctx, req, func(resp api.ProgressResponse) error { |
| 722 | return nil |
| 723 | }) |
| 724 | if err != nil { |
| 725 | return pushErrorMsg{err} |
| 726 | } |
| 727 | return pushSuccessMsg{modelName} |
| 728 | } |
| 729 | } |
| 730 | |
| 731 | // ModelFiles represents the files associated with a model |
| 732 | type ModelFiles struct { |