CoolFace
Apppublic

davanstrien/textual-serve-as-space

sourceHugging Faceupdated 10mo agoView on Hugging Face
1likes
App README

Textual Calculator on Hugging Face Spaces

This Space demonstrates a fully functional calculator application built with Textual and served through textual-serve on Hugging Face Spaces.

What is this?

This Space runs a macOS-inspired calculator application as a Terminal User Interface (TUI) in your web browser. It showcases how sophisticated TUI applications can be deployed as web apps using Textual and Hugging Face Spaces.

Calculator Features

  • โ€”๐Ÿ”ข Full arithmetic operations (addition, subtraction, multiplication, division)
  • โ€”% Percentage calculations
  • โ€”ยฑ Sign toggling
  • โ€”๐Ÿ–ฑ๏ธ Click buttons with your mouse
  • โ€”โŒจ๏ธ Use your keyboard for input
  • โ€”๐ŸŽจ Beautiful macOS-inspired design
  • โ€”๐Ÿš€ Real-time interaction via WebSockets

How it works

  1. 1.The Docker container runs a textual-serve server on port 7860
  2. 2.The server spawns the Textual demo application as a subprocess
  3. 3.WebSocket connections handle bidirectional communication
  4. 4.Your browser displays the terminal interface

Want to deploy your own Textual app?

Check out the source code to see how this Space is configured and adapt it for your own Textual applications!

Resources