{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreihlivtl5betqxhmvzno5mnwpsuqwq6j5k3ie4pvxppivws4wxj3rq",
"uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mi4rkxyzz4w2"
},
"path": "/t/my-space-is-stuck-on-building-forever/174733#post_1",
"publishedAt": "2026-03-28T12:04:59.000Z",
"site": "https://discuss.huggingface.co",
"textContent": "_import_ gradio _as_ gr\n---\n_from_ transformers _import_ pipeline\n_import_ os\n\n\n_# Grab the token from the Space’s Secrets_\ntoken = os.environ.get(“HF_TOKEN”)\n\n\n_# Load the model directly into the Space’s generous 16GB RAM_\n_print_(“Loading model into memory…”)\nner_pipe = pipeline(\n“ner”,\nmodel=“AHaldar/MythologicalNER”,\ntoken=token,\naggregation_strategy=“none”\n)\n_print_(“Model loaded successfully!”)\n\n\n_def_ _analyze_text_(text):\n_# The pipeline handles tokenization and PyTorch math_\nresults = ner_pipe(text)\n_# Clean up numpy types for safe JSON transmission_\ncleaned = []\n_for_ r _in_ results:\ncleaned.append({\n“entity”: _str_(r.get(“entity_group”, r.get(“entity”, “O”))),\n“word”: _str_(r[“word”]),\n“start”: _int_(r[“start”]),\n“end”: _int_(r[“end”])\n})\n_return_ cleaned\n\n\n_# Gradio automatically turns this interface into a REST API_\ndemo = gr.Interface(fn=analyze_text, inputs=“text”, outputs=“json”)\ndemo.launch()\n\nmy app.py is stuck on building forever. I do not understand why. My requirements.txt looks something like this:\n\ntransformers\n---\ntorch",
"title": "My space is stuck on building forever"
}