Spaces:
Sleeping
Sleeping
| title: Textual in a Space | |
| emoji: 🖥️ | |
| colorFrom: indigo | |
| colorTo: gray | |
| sdk: docker | |
| app_port: 7860 | |
| pinned: false | |
| # Textual Calculator on Hugging Face Spaces | |
| This Space demonstrates a fully functional calculator application built with [Textual](https://github.com/Textualize/textual) and served through [textual-serve](https://github.com/Textualize/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. The Docker container runs a textual-serve server on port 7860 | |
| 2. The server spawns the Textual demo application as a subprocess | |
| 3. WebSocket connections handle bidirectional communication | |
| 4. Your browser displays the terminal interface | |
| ## Want to deploy your own Textual app? | |
| Check out the [source code](https://huggingface.co/spaces/[your-username]/textual-serve/tree/main) to see how this Space is configured and adapt it for your own Textual applications! | |
| ## Resources | |
| - [Textual Documentation](https://textual.textualize.io/) | |
| - [Textual-Serve GitHub](https://github.com/Textualize/textual-serve) | |
| - [HF Spaces Docker SDK](https://huggingface.co/docs/hub/spaces-sdks-docker) | |