Upload 6 files
Browse files- .gitattributes +3 -0
- guide-assets/duplicate-menu.png +3 -0
- guide-assets/files-tab.png +3 -0
- guide-assets/signup-form.jpg +0 -0
- guide-assets/space-home.png +3 -0
- how-to-start.html +84 -0
- how-to-start.pdf +3 -0
.gitattributes
CHANGED
|
@@ -74,3 +74,6 @@ examples/turtle.jpg filter=lfs diff=lfs merge=lfs -text
|
|
| 74 |
examples/umbrella.jpg filter=lfs diff=lfs merge=lfs -text
|
| 75 |
examples/van.jpg filter=lfs diff=lfs merge=lfs -text
|
| 76 |
examples/watermelon.jpg filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
examples/umbrella.jpg filter=lfs diff=lfs merge=lfs -text
|
| 75 |
examples/van.jpg filter=lfs diff=lfs merge=lfs -text
|
| 76 |
examples/watermelon.jpg filter=lfs diff=lfs merge=lfs -text
|
| 77 |
+
guide-assets/duplicate-menu.png filter=lfs diff=lfs merge=lfs -text
|
| 78 |
+
guide-assets/files-tab.png filter=lfs diff=lfs merge=lfs -text
|
| 79 |
+
guide-assets/space-home.png filter=lfs diff=lfs merge=lfs -text
|
guide-assets/duplicate-menu.png
ADDED
|
Git LFS Details
|
guide-assets/files-tab.png
ADDED
|
Git LFS Details
|
guide-assets/signup-form.jpg
ADDED
|
guide-assets/space-home.png
ADDED
|
Git LFS Details
|
how-to-start.html
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
+
<meta name="description" content="A beginner guide to duplicating the course Hugging Face Space and publishing your own AI mini app.">
|
| 7 |
+
<title>How to Start - AI Mini App</title>
|
| 8 |
+
<style>
|
| 9 |
+
:root { color-scheme: light; --ink:#162033; --muted:#526176; --line:#d9e4ef; --blue:#2156a5; --light:#f4f8fc; --gold:#ffe49a; }
|
| 10 |
+
* { box-sizing:border-box; }
|
| 11 |
+
body { margin:0; color:var(--ink); background:#f7fafd; font:16px/1.58 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
|
| 12 |
+
a { color:var(--blue); }
|
| 13 |
+
a:focus-visible { outline:3px solid #faad23; outline-offset:3px; }
|
| 14 |
+
.shell { max-width:1080px; margin:auto; padding:24px 28px 72px; }
|
| 15 |
+
.topbar { display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; align-items:center; margin-bottom:34px; }
|
| 16 |
+
.brand { font-weight:760; letter-spacing:-.02em; color:var(--ink); text-decoration:none; }
|
| 17 |
+
.top-actions { display:flex; gap:10px; flex-wrap:wrap; }
|
| 18 |
+
.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; }
|
| 19 |
+
.hero { background:linear-gradient(135deg,#e7f1ff 0%,#f9fbff 65%,#fff5d5 100%); border:1px solid #cbdcf0; border-radius:26px; padding:40px 42px; }
|
| 20 |
+
.eyebrow { font-size:12px; font-weight:800; letter-spacing:.12em; color:#325f9b; margin:0 0 12px; }
|
| 21 |
+
h1 { margin:0; font-size:clamp(42px,6vw,70px); line-height:1.04; letter-spacing:-.055em; }
|
| 22 |
+
.subtitle { margin:16px 0 0; color:#32445d; font-size:21px; font-weight:600; }
|
| 23 |
+
.goal { margin:28px 0 0; padding:18px 20px; background:white; border-left:5px solid #2b67bb; border-radius:10px; font-size:17px; }
|
| 24 |
+
.time { margin:15px 0 0; color:var(--muted); font-size:14px; }
|
| 25 |
+
.route { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:26px 0 14px; }
|
| 26 |
+
.route span { background:#e8f0fa; border-radius:999px; padding:7px 11px; font-size:13px; font-weight:750; }
|
| 27 |
+
.route b { color:#67819f; }
|
| 28 |
+
.section-kicker { margin:34px 0 15px; font-size:12px; font-weight:800; letter-spacing:.12em; color:#4c6b94; text-transform:uppercase; }
|
| 29 |
+
.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); }
|
| 30 |
+
.step-top { display:flex; gap:14px; align-items:center; margin-bottom:12px; }
|
| 31 |
+
.step-num { display:inline-grid; place-items:center; flex:none; width:40px; height:40px; border-radius:12px; color:white; background:#245aa7; font-weight:800; }
|
| 32 |
+
h2 { margin:0; font-size:23px; line-height:1.2; letter-spacing:-.025em; }
|
| 33 |
+
.step-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr); gap:24px; }
|
| 34 |
+
.step-grid:has(.step-copy:only-child) { display:block; }
|
| 35 |
+
.step-copy p { margin:8px 0 12px; }
|
| 36 |
+
.screen { align-self:start; border:1px solid #bed2e9; border-radius:13px; overflow:hidden; background:#f8fbff; font-size:14px; }
|
| 37 |
+
.screen-label { display:block; background:#e6f0fc; padding:9px 14px; color:#315d97; font-size:11px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
|
| 38 |
+
.screen div { margin:0 12px; padding:11px 2px; border-bottom:1px solid #dbe7f2; font-weight:650; }
|
| 39 |
+
.screen div:last-child { border:0; }
|
| 40 |
+
.shot { margin:18px 0 0; }
|
| 41 |
+
.shot-image { position:relative; border:1px solid #d2dce8; border-radius:12px; overflow:hidden; line-height:0; }
|
| 42 |
+
.shot-image img { display:block; width:100%; height:auto; }
|
| 43 |
+
.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); }
|
| 44 |
+
.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; }
|
| 45 |
+
.shot figcaption { margin:9px 2px 0; color:var(--muted); font-size:13px; line-height:1.4; }
|
| 46 |
+
.filemap, .finish, .trouble { background:white; border:1px solid var(--line); border-radius:19px; padding:26px 28px; margin:16px 0; }
|
| 47 |
+
.filemap h2,.finish h2,.trouble h2 { margin-bottom:15px; }
|
| 48 |
+
table { border-collapse:collapse; width:100%; }
|
| 49 |
+
th,td { text-align:left; vertical-align:top; border-bottom:1px solid #e6edf5; padding:10px 6px; }
|
| 50 |
+
th { width:23%; }
|
| 51 |
+
tr:last-child th,tr:last-child td { border-bottom:0; }
|
| 52 |
+
code { background:#edf3fa; border-radius:5px; padding:2px 5px; color:#174781; }
|
| 53 |
+
.finish ul { list-style:none; padding:0; margin:0; }
|
| 54 |
+
.finish li { padding:8px 0 8px 32px; position:relative; }
|
| 55 |
+
.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; }
|
| 56 |
+
.help-row { display:grid; grid-template-columns:220px 1fr; gap:14px; padding:13px 0; border-top:1px solid #e6edf5; }
|
| 57 |
+
.help-row p { margin:0; }
|
| 58 |
+
.sources { font-size:13px; color:var(--muted); }
|
| 59 |
+
.sources ul { padding-left:20px; }
|
| 60 |
+
.footnote { color:#64758a; font-size:12px; }
|
| 61 |
+
@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%; } }
|
| 62 |
+
@media print { @page { size:A4; margin:11mm 13mm; } body { background:white; font-size:9.5pt; line-height:1.42; } .shell { max-width:none; padding:0; } .topbar { display:none; } .hero { border-radius:0; padding:15px 18px; } .hero h1 { font-size:31px; } .subtitle { font-size:15px; } .goal { margin:12px 0 8px; padding:10px 12px; } .route { margin:12px 0; gap:5px; } .route span { padding:6px 8px; } .section-kicker { margin:10px 0 5px; } .step { margin:8px 0; padding:14px 16px; border-radius:12px; box-shadow:none; break-inside:avoid; } .filemap,.finish,.trouble { margin:5px 0; padding:10px 12px; border-radius:12px; box-shadow:none; break-inside:avoid; } .filemap h2,.finish h2,.trouble h2 { margin-bottom:6px; } .step-top { margin-bottom:7px; } .step-num { width:30px; height:30px; } h2 { font-size:18px; } .step-copy p { margin:0 0 7px; } .screen { font-size:8.5pt; } .screen div { padding:7px 9px; } th,td { padding:4px 6px; } .finish li { padding:4px 0 4px 26px; } .finish li::before { top:5px; width:17px; height:17px; } .help-row { padding:5px 0; } .sources { margin-top:6px; font-size:8.5pt; break-inside:avoid; } .sources ul { margin:3px 0; } .footnote { margin:3px 0; font-size:7.5pt; } a { color:#174781; } }
|
| 63 |
+
</style>
|
| 64 |
+
</head>
|
| 65 |
+
<body>
|
| 66 |
+
<main class="shell">
|
| 67 |
+
<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>
|
| 68 |
+
<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>
|
| 69 |
+
<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>
|
| 70 |
+
<p class="section-kicker">The seven steps</p>
|
| 71 |
+
<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 sign-up page with email, password and Next fields" 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>
|
| 72 |
+
<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="./index.html">this image-classification Space</a>. In App, choose an example image and try Run AI Classification. The first run may take longer while the selected model downloads. Try Shuffle, compare two classifiers on one image, and inspect the score changes.</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 β Choose a classifier β Run AI Classification</div></aside></div><figure class="shot"><div class="shot-image"><img src="./guide-assets/space-home.png" alt="Actual AI-Powered Image Classification Space App page" loading="lazy"><span class="shot-mark" style="left:3.9%;top:54.5%;width:30%;height:41.5%" aria-label="Choose an image card"><b>1</b></span></div><figcaption>In the classification starter Space, open App and choose an example image (1).</figcaption></figure></section>
|
| 73 |
+
<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 AI-Powered Image Classification Space menu with Duplicate this Space option" loading="lazy"><span class="shot-mark" style="left:96.4%;top:1.3%;width:2.5%;height:5.0%" aria-label="More menu"><b>1</b></span><span class="shot-mark" style="left:74.8%;top:28.7%;width:18.5%;height:5.3%" 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>
|
| 74 |
+
<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 AI-Powered Image Classification Space Files tab showing index.html" loading="lazy"><span class="shot-mark" style="left:79.5%;top:10.6%;width:7.0%;height:6.3%" aria-label="Files tab"><b>1</b></span><span class="shot-mark" style="left:1.3%;top:74.5%;width:14.3%;height:6.0%" 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 the page text.</figcaption></figure></section>
|
| 75 |
+
<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 image classification or change the template into another AI application. For classification, useful extensions include comparing models, changing CLIP candidate labels, testing a new image domain, and documenting failure cases. 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>
|
| 76 |
+
<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>
|
| 77 |
+
<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>
|
| 78 |
+
<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>classifier.js</code></th><td>The starter's image-classification 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>
|
| 79 |
+
<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>
|
| 80 |
+
<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>
|
| 81 |
+
<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>
|
| 82 |
+
</main>
|
| 83 |
+
</body>
|
| 84 |
+
</html>
|
how-to-start.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a8a1a86723cce03921842b0bd1092e1b8e05dedeb0a158c34baa59de734c932
|
| 3 |
+
size 752858
|