Download ui/src/app/layout.tsx from michaelu0826/ai_toolkit_code: direct link, hf CLI and curl.
- Browser
- Download file 2.24 kB
-
https://huggingface.co/datasets/michaelu0826/ai_toolkit_code/resolve/main/ui/src/app/layout.tsx
- Command line
-
hf download hf://datasets/michaelu0826/ai_toolkit_code/ui/src/app/layout.tsx
-
curl -L -o layout.tsx https://huggingface.co/datasets/michaelu0826/ai_toolkit_code/resolve/main/ui/src/app/layout.tsx
2.24 kB
| import type { Metadata } from 'next'; | |
| import { Inter } from 'next/font/google'; | |
| import './globals.css'; | |
| import Sidebar from '@/components/Sidebar'; | |
| import { ThemeProvider } from '@/components/ThemeProvider'; | |
| import ConfirmModal from '@/components/ConfirmModal'; | |
| import { Suspense } from 'react'; | |
| import AuthWrapper from '@/components/AuthWrapper'; | |
| import DocModal from '@/components/DocModal'; | |
| import os from 'os'; | |
| import { CaptionDatasetModal } from '@/components/CaptionDatasetModal'; | |
| import MergeLoRAsModal from '@/components/MergeLoRAsModal'; | |
| export const dynamic = 'force-dynamic'; | |
| const inter = Inter({ subsets: ['latin'] }); | |
| export const metadata: Metadata = { | |
| title: 'Ostris - AI Toolkit', | |
| description: 'A toolkit for building AI things.', | |
| }; | |
| export const viewport = { | |
| width: 'device-width', | |
| initialScale: 1, | |
| maximumScale: 5, | |
| }; | |
| export default function RootLayout({ children }: { children: React.ReactNode }) { | |
| // Check if the AI_TOOLKIT_AUTH environment variable is set | |
| const authRequired = process.env.AI_TOOLKIT_AUTH ? true : false; | |
| const platform = os.platform(); | |
| return ( | |
| <html lang="en" suppressHydrationWarning> | |
| <head> | |
| <meta name="apple-mobile-web-app-title" content="AI-Toolkit" /> | |
| <script | |
| dangerouslySetInnerHTML={{ | |
| __html: ` | |
| (function() { | |
| var theme = localStorage.getItem('theme') || 'dark'; | |
| if (theme === 'dark') document.documentElement.classList.add('dark'); | |
| })(); | |
| `, | |
| }} | |
| /> | |
| ); | |
| } | |