{"course":{"slug":"hugging-face","title":"Hugging Face, End to End","url":"https://addaly.com/learn/hugging-face","level":"intermediate","track":"create"},"lesson":{"slug":"spaces-in-practice","title":"A Space is someone else's computer, already configured","url":"https://addaly.com/learn/hugging-face/spaces-in-practice","position":28,"of":75,"minutes":9,"answer":"Free CPU hardware runs one-file-at-a-time work well and cannot run image generation or fast chat, and a slow Space is usually a cold start or a shared queue rather than a fault.","keyIdea":"Free CPU hardware runs one-file-at-a-time work well and cannot run image generation or fast chat, and a slow Space is usually a cold start or a shared queue rather than a fault."},"body":{"format":"markdown","text":"## The thing you were about to install already runs in a browser\n\nThe hardest part of using an open model is not the model. It is CUDA versions, a Python environment that fights you, six gigabytes of dependencies and a laptop that does not have the memory. A Space skips all of it. Someone has already written the code, pinned the dependencies and pointed it at a model, and the Hub runs the whole thing behind a web page.\n\nSearch the Spaces tab for what you want in plain words: *remove background*, *transcribe audio*, *upscale*, *caption image*, *extract table from pdf*. Sort by likes or trending to find the ones people actually use. A phone browser works perfectly well; a Space is just a web page, and the only real constraint on a phone is uploading a large file over a mobile connection.\n\n## Why it is asleep, and why there is a queue\n\nTwo things confuse new users, and both have simple mechanisms.\n\n**Sleeping.** A Space on free hardware pauses itself after a stretch of inactivity, 48 hours by default, to stop the Hub running thousands of idle containers. Your visit wakes it. The container has to start, install nothing (it is already built) but load the model into memory, which for a mid-sized model is tens of seconds. A blank page or a *Space is starting* message is not a broken Space. Wait a minute before concluding anything.\n\n> Figure: What free CPU hardware does, and what it cannot. Runs well, one file at a time: Background removal and matting; Whisper at tiny, base or small on short clips; Captioning, OCR, document layout extraction; Classification, entity extraction, small translation; Embedding text for search. Does not run, and the arithmetic says why: Modern text-to-image: minutes to tens of minutes a picture; A 7B chat model at conversational speed; Anything real-time, including video; Large models at full precision, which do not fit 16 GB. Two virtual CPUs, sixteen gigabytes of RAM, no GPU, free permanently. The right-hand column is stopped by arithmetic rather than by software, so no amount of configuration moves an item across. If you find a free Space doing one of them, it is on ZeroGPU or its owner is paying.\n\n**The queue.** Gradio, the framework most Spaces use, processes requests one at a time by default. If nine other people clicked *Submit* just before you, you are ninth. The interface usually tells you your position. On a popular Space at a busy hour this is the whole of the experience, and it is the strongest argument for duplicating it, which is the next lesson.\n\n## The hardware shelf\n\nEvery Space runs on a tier chosen by its owner.\n\n- **CPU basic**, the free default: roughly 2 virtual CPUs, 16 GB of RAM, around 50 GB of disk, no GPU. Free with no time limit.\n- **ZeroGPU**: a shared pool of high-end GPU capacity, allocated for the duration of a single function call. Free to use with a per-person quota, larger for PRO subscribers. Because the GPU is acquired per call, there is start-up overhead on each request and long-running or stateful GPU work does not fit the model well.\n- **Rented GPUs**: T4, L4, A10G and up, billed by the hour. Roughly forty cents to a few dollars an hour depending on the card, as of late 2025. Billed for wall-clock time while the Space is running, not for requests served.\n\n## What free CPU does\n\nMore than people expect, as long as the work is one file at a time:\n\n- Background removal and matting.\n- Speech to text with Whisper at the tiny, base or small sizes, on clips of a few minutes.\n- Image captioning, OCR, document layout extraction.\n- Text classification, named entity extraction, translation with small models.\n- Embedding text for search.\n- Modest image upscaling, audio trimming, format conversion, subtitle generation.\n\nAnd what it does not do, with the reason:\n\n- **Text-to-image at modern quality.** SDXL or Flux on two CPU cores is minutes to tens of minutes per image, and the larger models will not fit in 16 GB at full precision at all. The arithmetic, not the software, is what stops you.\n- **Chat with a 7B model at conversational speed.** It will run and it will produce a word every second or two. Fine for a demo, unusable for a conversation.\n- **Video generation, or anything real-time.**\n\nIf a Space you find is doing one of those things for free, it is on ZeroGPU or its owner is paying, and both mean queues.\n\n## Before you upload anything\n\nA Space is a stranger's program. Open its Files tab and read `app.py`: most are under two hundred lines and you can see exactly what happens to your file. Check the *Community* tab too: the discussions there are where people report that a Space has been broken for three weeks.\n\nAnd apply the rule from the last lesson without negotiating with yourself: if the file is a client's, is under an agreement, or contains someone's personal data, do not upload it to a Space you do not control. Duplicate it instead, which takes one click and is the next lesson.\n\n## Do this now\n\nFind a Space that does something you currently pay for or currently do by hand. Run it once on a real file. Then open its `app.py` and find the line where the model is loaded: that name is a model on the Hub you could run yourself."},"check":{"question":"A Space that ran fine last month now shows a starting message for about a minute, then works normally. Later that day it responds only after a long delay, with a position number on screen. What is going on?","options":[{"text":"It slept after a period of inactivity and had to reload the model, and the later delay is the shared request queue with other users ahead of you.","correct":true},{"text":"The owner moved it from a rented GPU down to free CPU hardware, so everything now runs several times slower.","correct":false,"tempting":"Attributes both symptoms to a hardware downgrade when a start-up delay and a queue position have separate causes."},{"text":"Your account has hit a usage quota, so requests are being throttled until it resets.","correct":false,"tempting":"Reads a shared serving queue as a per-user limit applied to you."},{"text":"The underlying model repository was updated, so the Space is redownloading weights on every request.","correct":false,"tempting":"Assumes weights are fetched per request rather than loaded once when the container starts."}]},"prev":{"slug":"measuring-a-hardware-change","title":"Proving the change helped","url":"https://addaly.com/learn/hugging-face/measuring-a-hardware-change"},"next":{"slug":"gradio-in-forty-lines","title":"Forty lines from nothing to a public URL","url":"https://addaly.com/learn/hugging-face/gradio-in-forty-lines"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'A Space is someone else's computer, already configured', in Hugging Face, End to End. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/hugging-face/spaces-in-practice (Accessed: 31 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"A Space is someone else’s computer, already configured","courseTitle":"Hugging Face, End to End","module":{"index":4,"slug":"spaces-and-shipping-something","title":"Spaces: putting something in front of people"},"answer":null,"keyIdea":"Free CPU hardware runs one-file-at-a-time work well and cannot run image generation or fast chat, and a slow Space is usually a cold start or a shared queue rather than a fault.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure 4.1","figure":{"left":{"title":"Runs well, one file at a time","items":["Background removal and matting","Whisper at tiny, base or small on short clips","Captioning, OCR, document layout extraction","Classification, entity extraction, small translation","Embedding text for search"]},"type":"compare","right":{"title":"Does not run, and the arithmetic says why","items":["Modern text-to-image: minutes to tens of minutes a picture","A 7B chat model at conversational speed","Anything real-time, including video","Large models at full precision, which do not fit 16 GB"]},"title":"What free CPU hardware does, and what it cannot","caption":"Two virtual CPUs, sixteen gigabytes of RAM, no GPU, free permanently. The right-hand column is stopped by arithmetic rather than by software, so no amount of configuration moves an item across. If you find a free Space doing one of them, it is on ZeroGPU or its owner is paying."},"alt":"Figure: What free CPU hardware does, and what it cannot. Runs well, one file at a time: Background removal and matting; Whisper at tiny, base or small on short clips; Captioning, OCR, document layout extraction; Classification, entity extraction, small translation; Embedding text for search. Does not run, and the arithmetic says why: Modern text-to-image: minutes to tens of minutes a picture; A 7B chat model at conversational speed; Anything real-time, including video; Large models at full precision, which do not fit 16 GB. Two virtual CPUs, sixteen gigabytes of RAM, no GPU, free permanently. The right-hand column is stopped by arithmetic rather than by software, so no amount of configuration moves an item across. If you find a free Space doing one of them, it is on ZeroGPU or its owner is paying."}},"blocks":[{"t":"h2","id":"the-thing-you-were-about-to-install-already-runs-in-a-browse","runs":[{"text":"The thing you were about to install already runs in a browser"}]},{"t":"p","runs":[{"text":"The hardest part of using an open model is not the model. It is CUDA versions, a Python environment that fights you, six gigabytes of dependencies and a laptop that does not have the memory. A Space skips all of it. Someone has already written the code, pinned the dependencies and pointed it at a model, and the Hub runs the whole thing behind a web page."}]},{"t":"p","runs":[{"text":"Search the Spaces tab for what you want in plain words: "},{"text":"remove background","i":true},{"text":", "},{"text":"transcribe audio","i":true},{"text":", "},{"text":"upscale","i":true},{"text":", "},{"text":"caption image","i":true},{"text":", "},{"text":"extract table from pdf","i":true},{"text":". Sort by likes or trending to find the ones people actually use. A phone browser works perfectly well; a Space is just a web page, and the only real constraint on a phone is uploading a large file over a mobile connection."}]},{"t":"h2","id":"why-it-is-asleep-and-why-there-is-a-queue","runs":[{"text":"Why it is asleep, and why there is a queue"}]},{"t":"p","runs":[{"text":"Two things confuse new users, and both have simple mechanisms."}]},{"t":"p","runs":[{"text":"Sleeping.","b":true},{"text":" A Space on free hardware pauses itself after a stretch of inactivity, 48 hours by default, to stop the Hub running thousands of idle containers. Your visit wakes it. The container has to start, install nothing (it is already built) but load the model into memory, which for a mid-sized model is tens of seconds. A blank page or a "},{"text":"Space is starting","i":true},{"text":" message is not a broken Space. Wait a minute before concluding anything."}]},{"t":"p","runs":[{"text":"The queue.","b":true},{"text":" Gradio, the framework most Spaces use, processes requests one at a time by default. If nine other people clicked "},{"text":"Submit","i":true},{"text":" just before you, you are ninth. The interface usually tells you your position. On a popular Space at a busy hour this is the whole of the experience, and it is the strongest argument for duplicating it, which is the next lesson."}]},{"t":"h2","id":"the-hardware-shelf","runs":[{"text":"The hardware shelf"}]},{"t":"p","runs":[{"text":"Every Space runs on a tier chosen by its owner."}]},{"t":"ul","items":[[{"text":"CPU basic","b":true},{"text":", the free default: roughly 2 virtual CPUs, 16 GB of RAM, around 50 GB of disk, no GPU. Free with no time limit."}],[{"text":"ZeroGPU","b":true},{"text":": a shared pool of high-end GPU capacity, allocated for the duration of a single function call. Free to use with a per-person quota, larger for PRO subscribers. Because the GPU is acquired per call, there is start-up overhead on each request and long-running or stateful GPU work does not fit the model well."}],[{"text":"Rented GPUs","b":true},{"text":": T4, L4, A10G and up, billed by the hour. Roughly forty cents to a few dollars an hour depending on the card, as of late 2025. Billed for wall-clock time while the Space is running, not for requests served."}]]},{"t":"h2","id":"what-free-cpu-does","runs":[{"text":"What free CPU does"}]},{"t":"p","runs":[{"text":"More than people expect, as long as the work is one file at a time:"}]},{"t":"ul","items":[[{"text":"Background removal and matting."}],[{"text":"Speech to text with Whisper at the tiny, base or small sizes, on clips of a few minutes."}],[{"text":"Image captioning, OCR, document layout extraction."}],[{"text":"Text classification, named entity extraction, translation with small models."}],[{"text":"Embedding text for search."}],[{"text":"Modest image upscaling, audio trimming, format conversion, subtitle generation."}]]},{"t":"p","runs":[{"text":"And what it does not do, with the reason:"}]},{"t":"ul","items":[[{"text":"Text-to-image at modern quality.","b":true},{"text":" SDXL or Flux on two CPU cores is minutes to tens of minutes per image, and the larger models will not fit in 16 GB at full precision at all. The arithmetic, not the software, is what stops you."}],[{"text":"Chat with a 7B model at conversational speed.","b":true},{"text":" It will run and it will produce a word every second or two. Fine for a demo, unusable for a conversation."}],[{"text":"Video generation, or anything real-time.","b":true}]]},{"t":"p","runs":[{"text":"If a Space you find is doing one of those things for free, it is on ZeroGPU or its owner is paying, and both mean queues."}]},{"t":"h2","id":"before-you-upload-anything","runs":[{"text":"Before you upload anything"}]},{"t":"p","runs":[{"text":"A Space is a stranger’s program. Open its Files tab and read "},{"text":"app.py","code":true},{"text":": most are under two hundred lines and you can see exactly what happens to your file. Check the "},{"text":"Community","i":true},{"text":" tab too: the discussions there are where people report that a Space has been broken for three weeks."}]},{"t":"p","runs":[{"text":"And apply the rule from the last lesson without negotiating with yourself: if the file is a client’s, is under an agreement, or contains someone’s personal data, do not upload it to a Space you do not control. Duplicate it instead, which takes one click and is the next lesson."}]},{"t":"h2","id":"do-this-now","runs":[{"text":"Do this now"}],"role":"try"},{"t":"p","runs":[{"text":"Find a Space that does something you currently pay for or currently do by hand. Run it once on a real file. Then open its "},{"text":"app.py","code":true},{"text":" and find the line where the model is loaded: that name is a model on the Hub you could run yourself."}]}],"check":{"question":[{"text":"A Space that ran fine last month now shows a starting message for about a minute, then works normally. Later that day it responds only after a long delay, with a position number on screen. What is going on?"}],"options":[{"text":[{"text":"It slept after a period of inactivity and had to reload the model, and the later delay is the shared request queue with other users ahead of you."}],"correct":true,"tempting":null},{"text":[{"text":"The owner moved it from a rented GPU down to free CPU hardware, so everything now runs several times slower."}],"correct":false,"tempting":[{"text":"Attributes both symptoms to a hardware downgrade when a start-up delay and a queue position have separate causes."}]},{"text":[{"text":"Your account has hit a usage quota, so requests are being throttled until it resets."}],"correct":false,"tempting":[{"text":"Reads a shared serving queue as a per-user limit applied to you."}]},{"text":[{"text":"The underlying model repository was updated, so the Space is redownloading weights on every request."}],"correct":false,"tempting":[{"text":"Assumes weights are fetched per request rather than loaded once when the container starts."}]}],"order":[3,1,0,2],"why":null},"prev":{"slug":"measuring-a-hardware-change","title":"Proving the change helped","minutes":8},"next":{"slug":"gradio-in-forty-lines","title":"Forty lines from nothing to a public URL","minutes":9}}}