import React from "react"; import { motion, AnimatePresence } from "framer-motion"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { X } from "lucide-react"; import CodeBlock from "./CodeBlock"; export default function CodeModal({ isOpen, onClose, code, language = "python" }) { if (!isOpen) return null; let codeString = ""; if (typeof code === "string") { codeString = code; } else if (code && typeof code === "object") { codeString = code.code || JSON.stringify(code, null, 2); } return ( e.stopPropagation()} > Generated Training Script

This is the complete PyTorch training script generated by the AI based on your configuration. It's ready to be executed by the training monitor.

); }