--- title: Simple Test App emoji: ๐Ÿงช colorFrom: green colorTo: blue sdk: gradio sdk_version: 4.44.0 app_file: app.py pinned: false --- # ๐Ÿงช Simple Gradio Test App A lightweight test application to verify Hugging Face Spaces deployment. ## Features - **Greeting Generator** - Create personalized greetings with adjustable enthusiasm - **Calculator** - Perform basic arithmetic operations - **Text Reverser** - Reverse any text input - **Timestamp** - Display current server time ## Purpose This is a minimal test app designed to: - โœ… Verify Hugging Face Spaces deployment works - โœ… Test the Gradio interface - โœ… Test API endpoints - โœ… Ensure quick build times (~1 minute) - โœ… Use minimal resources (perfect for free tier) ## Local Development ```bash # Install dependencies pip install -r requirements.txt # Run the app python app.py ``` Open http://localhost:7860 in your browser. ## API Usage ### Greeting Endpoint ```python import requests response = requests.post( "https://YOUR-USERNAME-YOUR-SPACE.hf.space/api/predict", json={ "data": ["Alice", 3] } ) print(response.json()) ``` ### Calculator Endpoint ```python response = requests.post( "https://YOUR-USERNAME-YOUR-SPACE.hf.space/api/predict", json={ "data": [10, "Add", 5] } ) print(response.json()) ``` ### cURL Example ```bash curl -X POST "https://YOUR-USERNAME-YOUR-SPACE.hf.space/api/predict" \ -H "Content-Type: application/json" \ -d '{"data": ["World", 2]}' ``` ## Deployment This app deploys in about 1 minute on Hugging Face Spaces (free tier). ### Quick Deploy Steps 1. Go to https://huggingface.co/spaces 2. Click "Create new Space" 3. Choose Gradio SDK 4. Upload the files: - `app.py` - `requirements.txt` - `README.md` 5. Wait ~1 minute for build 6. Done! ## Tech Stack - **Framework:** Gradio 4.0+ - **Language:** Python 3.12 - **Size:** ~5MB (very lightweight) - **Build Time:** ~60 seconds ## License MIT License - Feel free to use and modify! --- Built with โค๏ธ using Gradio Perfect for testing HF Spaces deployment before deploying larger models!