File size: 1,429 Bytes
7afadff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$ErrorActionPreference = "Stop"
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
$repoRoot = Resolve-Path (Join-Path $scriptPath "..")
Set-Location $repoRoot

while ($true) {
    Write-Host "" 
    Write-Host "========================================" -ForegroundColor Cyan
    Write-Host "MarsLM - Menú principal" -ForegroundColor Cyan
    Write-Host "========================================" -ForegroundColor Cyan
    Write-Host "1. Entrenar modelo" -ForegroundColor Yellow
    Write-Host "2. Generar texto" -ForegroundColor Yellow
    Write-Host "3. Ver checkpoints" -ForegroundColor Yellow
    Write-Host "4. Salir" -ForegroundColor Yellow
    $choice = Read-Host "Elige una opción"

    switch ($choice) {
        "1" {
            $epochs = Read-Host "Número de epochs (por ejemplo 5)"
            powershell -ExecutionPolicy Bypass -File .\scripts\TrainEvaluate.ps1 -Epochs $epochs
        }
        "2" {
            $prompt = Read-Host "Escribe el prompt"
            powershell -ExecutionPolicy Bypass -File .\scripts\GenerateText.ps1 -Prompt $prompt -MaxNewTokens 60 -Temperature 0.2
        }
        "3" {
            Get-ChildItem .\artifacts\checkpoints | Select-Object Name, Length | Format-Table -AutoSize
        }
        "4" {
            break
        }
        default {
            Write-Host "Opción no válida" -ForegroundColor Red
        }
    }
}