Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 2,727 Bytes
f555806 |
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
## Database Modes
Use the `NEXT_PUBLIC_DB_MODE` environment variable to control how UI data is persisted:
- `server` (default): interacts with the shared SQLite database through Prisma. Supports local job orchestration.
- `browser`: stores jobs and settings in the user's browser (localStorage). This mode only supports Hugging Face Jobs workflows; local GPU training controls are disabled and the GPU monitor shows a cloud-mode status banner.
When running in browser mode every visitor sees only their own jobs, settings, and dataset catalog (all stored in their browser), making the UI safe to host for multiple users without sharing the SQLite file.
## Hugging Face Authentication
Users can authenticate either by pasting a personal access token or via the Hugging Face OAuth flow. To enable OAuth set the following environment variables for the UI:
- `HF_OAUTH_CLIENT_ID` – the application client ID
- `HF_OAUTH_CLIENT_SECRET` – the application secret (server-side only)
- `NEXT_PUBLIC_HF_OAUTH_CLIENT_ID` – the client ID exposed to the browser (usually the same as `HF_OAUTH_CLIENT_ID`)
If these values are not provided the UI falls back to manual token entry. In multi-user/browser mode the authenticated token and namespace are stored per browser session.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|