Spaces:
Running on Zero
Running on Zero
Deploy Memory Studio public demo
Browse filesFiles changed (2)
- local_llm.py+2-1
- memory_studio.py+15-3
355 unmodified lines356357358359360361362355 unmodified linessomething to it (crash into, swallow, burst out of, squirt, chase...).- Add one sound, smell, or feeling to each line. Exaggerate size, colour, andmovement; be absurd.- Use the exact {noun} in its own line. One or two short sentences per line.- No title, introduction, explanation, or conclusion.Words each line must contain:355 unmodified lines356357358359360361362363355 unmodified linessomething to it (crash into, swallow, burst out of, squirt, chase...).- Add one sound, smell, or feeling to each line. Exaggerate size, colour, andmovement; be absurd.- Use the exact {noun} in its own line. One or two short sentences per line(under 40 words). Never mention a later image before its own line.- No title, introduction, explanation, or conclusion.Words each line must contain:
911 unmodified lines91291391491591691742 unmodified lines960961962963964965966967968969970971972973974975976977978979911 unmodified linesrow.insert(STORY_LINE_COLUMN, line)def _names_image(label: str, text: str) -> bool:"""True if ``text`` names the image word, allowing a plural (lip/lips)."""needle = re.escape(" ".join(label.casefold().split()))42 unmodified lineslineand line not in STORY_EXAMPLE_LINESand _names_image(items[index].label, line)# A link must also touch the previous picture.and (index == 0 or _names_image(items[index - 1].label, line))):lines[index] = linerecord[index] = None # keep it like your own linereplaced += 1notes.append(f"The local model wrote {replaced} of {len(generated)} story ""line(s); each one names its own image and the one before it. ""The rest use the built-in ""lines. Edit any line, or clear it to get a fresh one."if replacedelse "The local model's story lines were not usable (each line ""must name its own image and the one before it), so the built-in ""lines are shown.")except LocalModelError as exc:911 unmodified lines91291391491591691791891992042 unmodified lines963964965966967968969970971972973974975976977978979980981982983984985986987988989990991911 unmodified linesrow.insert(STORY_LINE_COLUMN, line)MAX_STORY_LINE_WORDS = 45def _names_image(label: str, text: str) -> bool:"""True if ``text`` names the image word, allowing a plural (lip/lips)."""needle = re.escape(" ".join(label.casefold().split()))42 unmodified lineslineand line not in STORY_EXAMPLE_LINESand _names_image(items[index].label, line)# A link must also touch the previous picture...and (index == 0 or _names_image(items[index - 1].label, line))# ...must not give away the next one before its turn...and (index + 1 >= len(items)or _names_image(items[index].label, items[index + 1].label)or not _names_image(items[index + 1].label, line))# ...and must stay short enough to read in one breath.and len(line.split()) <= MAX_STORY_LINE_WORDS):lines[index] = linerecord[index] = None # keep it like your own linereplaced += 1notes.append(f"The local model wrote {replaced} of {len(generated)} story ""line(s); each one links its own image to the one before it. ""The rest use the built-in ""lines. Edit any line, or clear it to get a fresh one."if replacedelse "The local model's story lines were not usable (each line ""must link its own image to the one before it, without giving ""away the next one), so the built-in ""lines are shown.")except LocalModelError as exc:
local_llm.py+2-1
memory_studio.py+15-3