test / how-to-start.html
wr92's picture miyuki17's picture
docs(space): show annotated signup page (#2)
a46161e
Raw History Blame Contribute Delete
17.2 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A beginner guide to duplicating the course Hugging Face Space and publishing your own AI mini app.">
<title>How to Start Β· AI Mini App</title>
<style>
:root { color-scheme: light; --ink:#162033; --muted:#526176; --line:#d9e4ef; --blue:#2156a5; --light:#f4f8fc; --gold:#ffe49a; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:#f7fafd; font:16px/1.58 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
a { color:var(--blue); }
a:focus-visible { outline:3px solid #faad23; outline-offset:3px; }
.shell { max-width:1080px; margin:auto; padding:24px 28px 72px; }
.topbar { display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; align-items:center; margin-bottom:34px; }
.brand { font-weight:760; letter-spacing:-.02em; color:var(--ink); text-decoration:none; }
.top-actions { display:flex; gap:10px; flex-wrap:wrap; }
.top-actions a { text-decoration:none; border:1px solid var(--line); background:white; border-radius:999px; padding:8px 13px; font-size:13px; font-weight:650; }
.hero { background:linear-gradient(135deg,#e7f1ff 0%,#f9fbff 65%,#fff5d5 100%); border:1px solid #cbdcf0; border-radius:26px; padding:40px 42px; }
.eyebrow { font-size:12px; font-weight:800; letter-spacing:.12em; color:#325f9b; margin:0 0 12px; }
h1 { margin:0; font-size:clamp(42px,6vw,70px); line-height:1.04; letter-spacing:-.055em; }
.subtitle { margin:16px 0 0; color:#32445d; font-size:21px; font-weight:600; }
.goal { margin:28px 0 0; padding:18px 20px; background:white; border-left:5px solid #2b67bb; border-radius:10px; font-size:17px; }
.time { margin:15px 0 0; color:var(--muted); font-size:14px; }
.route { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:26px 0 14px; }
.route span { background:#e8f0fa; border-radius:999px; padding:7px 11px; font-size:13px; font-weight:750; }
.route b { color:#67819f; }
.section-kicker { margin:34px 0 15px; font-size:12px; font-weight:800; letter-spacing:.12em; color:#4c6b94; text-transform:uppercase; }
.step { border:1px solid var(--line); background:white; border-radius:19px; padding:26px 28px; margin:16px 0; box-shadow:0 8px 24px rgba(35,65,110,.035); }
.step-top { display:flex; gap:14px; align-items:center; margin-bottom:12px; }
.step-num { display:inline-grid; place-items:center; flex:none; width:40px; height:40px; border-radius:12px; color:white; background:#245aa7; font-weight:800; }
h2 { margin:0; font-size:23px; line-height:1.2; letter-spacing:-.025em; }
.step-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr); gap:24px; }
.step-grid:has(.step-copy:only-child) { display:block; }
.step-copy p { margin:8px 0 12px; }
.screen { align-self:start; border:1px solid #bed2e9; border-radius:13px; overflow:hidden; background:#f8fbff; font-size:14px; }
.screen-label { display:block; background:#e6f0fc; padding:9px 14px; color:#315d97; font-size:11px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.screen div { margin:0 12px; padding:11px 2px; border-bottom:1px solid #dbe7f2; font-weight:650; }
.screen div:last-child { border:0; }
.shot { margin:18px 0 0; }
.shot-image { position:relative; border:1px solid #d2dce8; border-radius:12px; overflow:hidden; line-height:0; }
.shot-image img { display:block; width:100%; height:auto; }
.shot-mark { position:absolute; border:3px solid #df4c31; border-radius:6px; box-shadow:0 0 0 2px rgba(255,255,255,.9),0 0 0 5px rgba(223,76,49,.22); }
.shot-mark b { position:absolute; top:-13px; left:-13px; display:grid; place-items:center; width:25px; height:25px; background:#df4c31; border:2px solid white; border-radius:50%; color:white; font:800 13px/1 system-ui,sans-serif; }
.shot figcaption { margin:9px 2px 0; color:var(--muted); font-size:13px; line-height:1.4; }
.filemap, .finish, .trouble { background:white; border:1px solid var(--line); border-radius:19px; padding:26px 28px; margin:16px 0; }
.filemap h2,.finish h2,.trouble h2 { margin-bottom:15px; }
table { border-collapse:collapse; width:100%; }
th,td { text-align:left; vertical-align:top; border-bottom:1px solid #e6edf5; padding:10px 6px; }
th { width:23%; }
tr:last-child th,tr:last-child td { border-bottom:0; }
code { background:#edf3fa; border-radius:5px; padding:2px 5px; color:#174781; }
.finish ul { list-style:none; padding:0; margin:0; }
.finish li { padding:8px 0 8px 32px; position:relative; }
.finish li::before { content:"βœ“"; display:grid; place-items:center; position:absolute; left:0; top:9px; width:21px; height:21px; color:#155e58; background:#ddf4ef; border-radius:6px; font-weight:bold; }
.help-row { display:grid; grid-template-columns:220px 1fr; gap:14px; padding:13px 0; border-top:1px solid #e6edf5; }
.help-row p { margin:0; }
.sources { font-size:13px; color:var(--muted); }
.sources ul { padding-left:20px; }
.footnote { color:#64758a; font-size:12px; }
@media(max-width:720px) { .shell { padding:18px 16px 54px; } .hero { padding:28px 24px; } .step,.filemap,.finish,.trouble { padding:21px; } .step-grid { grid-template-columns:1fr; } .help-row { grid-template-columns:1fr; gap:2px; } th { width:31%; } }
@media print { @page { size:A4; margin:15mm; } body { background:white; font-size:11pt; } .shell { max-width:none; padding:0; } .topbar { display:none; } .hero { border-radius:0; padding:20px; } .step,.filemap,.finish,.trouble { box-shadow:none; break-inside:avoid; } a { color:#174781; } }
</style>
</head>
<body>
<main class="shell">
<nav class="topbar" aria-label="Guide navigation"><a class="brand" href="./index.html">← Back to App</a><div class="top-actions"><a href="./index.html">Open app</a><a href="./how-to-start.pdf" download>Download PDF</a></div></nav>
<header class="hero"><p class="eyebrow">STUDENT GUIDE Β· HUGGING FACE SPACES</p><h1>How to Start</h1><p class="subtitle">Turn the course demo into your own AI mini app</p><p class="goal">Your finish line: a public Space under your own account that shows what your AI app does. Submit its Space link so your instructor can open and try your work quickly.</p><p class="time">You can follow the basic route entirely in your browser. No Git commands are needed.</p></header>
<div class="route" aria-label="The route"><span>Sign up</span><b>β†’</b><span>Duplicate</span><b>β†’</b><span>Change the app</span><b>β†’</b><span>Test</span><b>β†’</b><span>Submit your URL</span></div>
<p class="section-kicker">The seven steps</p>
<section class="step" id="step-01"><div class="step-top"><span class="step-num">01</span><h2>Create your Hugging Face account</h2></div><div class="step-grid"><div class="step-copy"><p>Open <a href="https://huggingface.co/join" target="_blank" rel="noopener noreferrer">https://huggingface.co/join</a>. Enter an email address you check often. Your Gmail address, or the email you use for GitHub, is fine.</p><p>Create a password, click Next, and complete the account steps shown. Sign in when you are done.</p></div><aside class="screen"><span class="screen-label">On the sign-up page</span><div>Join Hugging Face</div><div>Email Address β†’ Password β†’ Next</div></aside></div><figure class="shot"><div class="shot-image"><img src="./guide-assets/signup-form.jpg" alt="Actual Hugging Face webpage for step 01" loading="lazy"><span class="shot-mark" style="left:36.6406%;top:41.1111%;width:26.7188%;height:6.1111%" aria-label="Email Address"><b>1</b></span><span class="shot-mark" style="left:36.6406%;top:59.1667%;width:26.7188%;height:6.2500%" aria-label="Password"><b>2</b></span><span class="shot-mark" style="left:36.6406%;top:69.7222%;width:26.7188%;height:5.4167%" aria-label="Next"><b>3</b></span></div><figcaption>On the sign-up page, enter your email (1) and password (2), then choose Next (3).</figcaption></figure></section>
<section class="step" id="step-02"><div class="step-top"><span class="step-num">02</span><h2>Explore the starter demo</h2></div><div class="step-grid"><div class="step-copy"><p>Open <a href="https://huggingface.co/spaces/wr92-course/test" target="_blank" rel="noopener noreferrer">https://huggingface.co/spaces/wr92-course/test</a>. In App, choose an example image and try Run AI Detection. The first run may take longer while the model downloads.</p><p>Open Files to see the files you will receive in your own copy. You are looking at a working example, not a blank project.</p></div><aside class="screen"><span class="screen-label">On the starter Space</span><div>App | Files | Community | More (three dots)</div><div>Choose an image β†’ Run AI Detection</div></aside></div><figure class="shot"><div class="shot-image"><img src="./guide-assets/space-home.png" alt="Actual Hugging Face webpage for step 02" loading="lazy"><span class="shot-mark" style="left:1.3889%;top:17.8571%;width:46.2963%;height:19.2857%" aria-label="The working app"><b>1</b></span></div><figcaption>The course starter Space: open the App and try one example.</figcaption></figure></section>
<section class="step" id="step-03"><div class="step-top"><span class="step-num">03</span><h2>Duplicate it into your account</h2></div><div class="step-grid"><div class="step-copy"><p>On the starter Space, open the three-dot menu at the top right and choose Duplicate this Space.</p><p>Set Owner to your own account and give the Space a clear name. Set Visibility to Public so your instructor can open it. The duplicate form starts with Private selected.</p><p>Click Duplicate Space. The complete starter project is copied for you; you do not need to paste each code file by hand.</p></div><aside class="screen"><span class="screen-label">The two clicks to find</span><div>Top-right menu (three dots) β†’ Duplicate this Space</div><div>Owner: your account | Space name: your-project</div><div>Visibility: Public β†’ Duplicate Space</div></aside></div><figure class="shot"><div class="shot-image"><img src="./guide-assets/duplicate-menu.png" alt="Actual Hugging Face webpage for step 03" loading="lazy"><span class="shot-mark" style="left:44.1667%;top:1.1429%;width:2.7778%;height:4.5714%" aria-label="More menu"><b>1</b></span><span class="shot-mark" style="left:44.5370%;top:43.7143%;width:16.6667%;height:4.7143%" aria-label="Duplicate this Space"><b>2</b></span></div><figcaption>On the source Space, open More (1), then choose Duplicate this Space (2).</figcaption></figure></section>
<section class="step" id="step-04"><div class="step-top"><span class="step-num">04</span><h2>Make a first edit in your copy</h2></div><div class="step-grid"><div class="step-copy"><p>Open your new Space. Select Files, open index.html, and use Edit to change the visible title and short introduction to describe your idea.</p><p>Save with a short commit message using Commit changes to main. Then return to App and check that your new text appears.</p><p>To add a new file or upload a replacement, use Files β†’ Add file. Save the change with a commit.</p></div><aside class="screen"><span class="screen-label">Browser editing route</span><div>Your Space β†’ Files β†’ index.html β†’ Edit</div><div>Change text β†’ Commit changes to main β†’ App</div></aside></div><figure class="shot"><div class="shot-image"><img src="./guide-assets/files-tab.png" alt="Actual Hugging Face webpage for step 04" loading="lazy"><span class="shot-mark" style="left:11.0185%;top:16.0000%;width:7.5926%;height:7.0000%" aria-label="Files tab"><b>1</b></span><span class="shot-mark" style="left:4.3519%;top:69.2857%;width:10.6481%;height:6.0000%" aria-label="index.html"><b>2</b></span></div><figcaption>The Files tab (1) lists the starter code. Open index.html (2) in your own copy to edit its page text.</figcaption></figure></section>
<section class="step" id="step-05"><div class="step-top"><span class="step-num">05</span><h2>Build your AI mini app</h2></div><div class="step-grid"><div class="step-copy"><p>You may keep improving object detection or change the template into another AI application. Give visitors a clear title, a short explanation, an obvious input, and a result they can understand.</p><p>Edit the relevant files below. Keep the README.md configuration lines sdk: static and app_file: index.html while using this browser-based route.</p><p>This Static Space runs HTML, CSS, and browser JavaScript. Uploading a Python file alone will not run a Python server. A server-based app needs a different Space type and may require a paid plan; check with your instructor before taking that route.</p><p>Never place an API key or access token in public HTML or JavaScript files.</p></div></div></section>
<section class="step" id="step-06"><div class="step-top"><span class="step-num">06</span><h2>Help your instructor understand it fast</h2></div><div class="step-grid"><div class="step-copy"><p>Make the App page answer these questions in the first few seconds: What does it do? What should I try? What result should I expect?</p><p>Update README.md with a brief project summary: purpose, input and output, AI model or service, what you changed from the starter, and one test or limitation.</p></div><aside class="screen"><span class="screen-label">Copy this mini summary into README.md</span><div>My app: [one-sentence purpose]</div><div>Input β†’ output: [what a visitor provides and receives]</div><div>AI model/service: [name and link]</div><div>I changed: [your main additions]</div><div>Test / limitation: [one honest observation]</div></aside></div></section>
<section class="step" id="step-07"><div class="step-top"><span class="step-num">07</span><h2>Test and submit</h2></div><div class="step-grid"><div class="step-copy"><p>Return to App and wait for the Space to finish updating. Try at least one real input from beginning to end and check the output. If a model loads for the first time, allow extra time.</p><p>Open your Space link in a private browser window to check that other people can view it. If it shows 404, check Settings β†’ Visibility and make it Public.</p><p>Submit the Space page URL, not the embedded .hf.space address, plus two sentences saying what your app does and what you changed.</p></div><aside class="screen"><span class="screen-label">Submit this URL shape</span><div>https://huggingface.co/spaces/your-username/your-project-name</div></aside></div></section>
<section class="filemap"><h2>Which file should I edit?</h2><table><tbody><tr><th scope='row'><code>index.html</code></th><td>Page structure, visible title, instructions and input/output areas</td></tr><tr><th scope='row'><code>style.css</code></th><td>Colours, spacing and layout</td></tr><tr><th scope='row'><code>app.js</code></th><td>Buttons, inputs and result display</td></tr><tr><th scope='row'><code>detector.js</code></th><td>The starter&#x27;s object-detection model call; adapt or replace for a new task</td></tr><tr><th scope='row'><code>README.md</code></th><td>Space title/configuration and the summary your instructor can scan</td></tr></tbody></table></section>
<section class="finish"><h2>Before you submit</h2><ul><li>My Space is Public and opens from a private browser window.</li><li>The App page explains my project and a visitor can try it.</li><li>At least one input produces a useful result.</li><li>README.md says what I changed and names the AI model or service.</li><li>I submitted the Hugging Face Space page URL and a two-sentence summary.</li></ul></section>
<section class="trouble"><h2>If you get stuck</h2><div class='help-row'><strong>My teacher sees 404</strong><p>Check Settings β†’ Visibility. A Private Space is only visible to its owner.</p></div><div class='help-row'><strong>My old page still appears</strong><p>Check that the edit was committed, then refresh App after the Space updates.</p></div><div class='help-row'><strong>The AI result does not appear</strong><p>Try a known example, allow first-time model download, and check that your model can run in the browser.</p></div><div class='help-row'><strong>I need Python on a server</strong><p>Ask your instructor about a Gradio or Docker Space and check current account requirements before changing SDK.</p></div></section>
<footer class="sources"><strong>Official Hugging Face references</strong><ul><li><a href="https://huggingface.co/docs/hub/spaces-overview" target="_blank" rel="noopener noreferrer">Spaces overview and duplication</a></li><li><a href="https://huggingface.co/docs/hub/spaces-sdks-static" target="_blank" rel="noopener noreferrer">Static HTML Spaces</a></li><li><a href="https://huggingface.co/docs/hub/repositories-getting-started" target="_blank" rel="noopener noreferrer">Editing files in the browser</a></li></ul><p class="footnote">Hugging Face labels and account rules can change. If a button looks different, use the linked official help pages.</p></footer>
</main>
</body>
</html>