Pull to refresh

Show HN: Prompt-to-Excalidraw demo with Gemma 4 E2B in the browser (3.1GB) (teamchong.github.io)

by teamchong 62 comments 163 points
Read article View on HN

62 comments

[−] locusofself 25d ago
I've had excellent luck using Claude Code to generate "mermaid diagrams" for me, and convert them to .png format headlessly using mmdc/puppeteer. Really helped me out with an engineering proposal I just finished. In past years I would have fumbled around with Visio forever and the result would have been worse.
[−] ascorbic 25d ago
I find Mermaid diagram rendering is quite ugly by default. I've gotten much better-looking results by asking it to just generate SVGs. As a bonus it can do animations too. e.g. see slide 3 here, which I first tried with Mermaid and then switched to SVG when I couldn't get the rendering to look good: https://talks.mk.gg/2026/atmosphereconf/
[−] d4rkp4ttern 25d ago
I now often have CC make technical/architecture diagrams with tikz, the results look much better than mermaid but still requires multiple iterations to fix bad arrows, bad layouts etc.

Diagrams are still far from solved. We need a good non-gameable diagrams benchmark.

[−] 0xchamin 25d ago
I use Claude Code and Gemini and to LLM as a judge among the two to review each others result and generate a final mermiad diagram.
[−] system_operator 25d ago
do the same.

I just ask Claude code for mermaid to visualize any topic I'm discussing.

[−] lxgr 25d ago
In a pinch, Claude is also quite good at ASCII art in my experience!
[−] alfiedotwtf 24d ago
Same here!
[−] thawab 25d ago
You can copy past the mermaid to excalidraw to visualize it.
[−] halJordan 25d ago
And yet people here insist that the height of an llm is not being above to draw a pelican or count letters in a word
[−] wongarsu 25d ago
Well, mermaid diagrams are "just" a list of nodes and their relations. You'd expect any llm capable of generating code to be able to generate them

Writing an SVG of a pelican riding a bicycle without being able to see the result and iterate based on that is incredibly difficult by comparison. I'm sure some humans could do it, but I sure can't. That's part of the beauty of it: it's very difficult to do but a toddler could judge the results

Writing an SVG of a diagram by hand would be somewhere on the middle ground. Or depending on the number of nodes might be even harder than the pelican. Layouting diagrams can get tricky very quickly. It's also one of Mermaid's biggest weaknesses

[−] christkv 25d ago
Just wait if they go public. Claude 5.4 fails the Pelican test stock sheds 20% of value pf news. Wall street wonders if the lack of front wheel means there is something seriously wrong with the stocks underlying value
[−] chermi 23d ago
Could you share your setup + workflow? How do you get it to not give shit layouts?
[−] userbinator 25d ago
Am I correct in interpreting the title to mean that visiting the page will result in a 3.1GB download?
[−] avrionov 25d ago
Yes. I tested it. It downloaded 3.1GB
[−] logicallee 25d ago
I love this idea. Unfortunately, it says "Unsupported browser/GPU" for me. This is Desktop Chrome version 147 (page says it requires 134+) and I have a 1060 card with 6 GB of RAM on this specific device, so it should fit. I have more than 4 GB of free RAM as well.
[−] OsamaJaber 25d ago
Small models in the browser are a different optimization problem than small models on a server. On server you chase throughput so you batch. In browser you're stuck at batch size 1, which means kernel launch overhead and memory bandwidth dominate, not FLOPs
[−] walthamstow 25d ago
The Gemma models really are amazing. I was on a flight a few days ago and used E2B to do some basic research on the place I was going to, running the model locally on my Pixel 10 Pro. It gave me basically the same as Gemini or ChatGPT would do when I landed
[−] billyp-rva 25d ago

> "OAuth 2.0 authorization code flow with PKCE as a sequence diagram — user, browser, app server, auth server, API"

If you do a Google image search for "OAuth 2.0 PKCE sequence diagram" you get good results also. Maybe if you ask for something more esoteric this becomes valuable? Of course, that also makes hallucinations more likely.

[−] Sathwickp 25d ago
just tried it out, must say it's amazing the speed at which it generates these diagrams Is this opensource by any chance? Would love to take a look at the code and understand how it works
[−] Mystery-Machine 24d ago
Please never do this again. It's insane that the 3.1GB download kicks off as soon as you open the page.
[−] rahimnathwani 25d ago
How does this part work?

"The LLM outputs compact code (~50 tokens) instead of raw Excalidraw JSON (~5,000 tokens)."

I see on the left that the LLM is outputting some instructions to add nodes and edges to the diagram. But what is interpreting those commands and turning them into an Excalidraw file?

[−] 0xchamin 25d ago
very interesting. Prompt to "generate System Design like ChatGPT end to end". Took about ~3-5 mins the model to download. It generated a reasonably good system design.
[−] classified 25d ago
Bloat will expand to fill all available space.
[−] wesleynepo 25d ago
Really interesting, I wish I could understand the under the hood better but I guess I don't have all the background needed.
[−] vismit2000 25d ago
[−] xnx 25d ago
It seems like Gemma should replace Gemini Nano as the AI built into Chrome.
[−] agent37 25d ago
Very cool. Did you happen to try other models like Qwen and was there a difference as opposed to Gemma ?
[−] hhthrowaway1230 25d ago
so multiple of these browser wasm demos make me re-download the models, can someone make a cdn for it or some sort u uberfast downloader? just throw some claude credits against it ty!
[−] COOLmanYT 25d ago
no firefox support?
[−] busssard 25d ago
no firefox? sad :(
[−] moralestapia 24d ago
I, for one, welcome this new trend of Gigabyte-sized websites.
[−] zhangchen 25d ago
[dead]
[−] nigardev 25d ago
[flagged]