Spaces:
Sleeping

simple-test-app / README.md
maddiman's picture
Add complete Gradio app with DeBERTa integration
e2ff4e7
|
Raw History Blame Contribute Delete
2.12 kB
---
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!