Spaces:
Configuration error
Configuration error
File size: 1,029 Bytes
01ba07a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # Minimal Hugging Face Space for Intel Image Classifier
This folder contains a minimal Hugging Face Space app using a custom `index.html` frontend and a Python backend.
## Files
- `app.py` — FastAPI backend for prediction and frontend delivery
- `index.html` — frontend UI for uploading images and selecting the model
- `requirements.txt` — dependencies
- `models/` — place your trained models here
## Model files required
Place your trained models in `hf_space/models/`:
- `pytorch_model.pth`
- `model_best.keras`
## Deploying on Hugging Face Spaces
1. Create a new Space on Hugging Face
2. Select `Python` SDK
3. Push the contents of this `hf_space/` directory to the new Space repository
The Space will run `app.py` automatically and serve `index.html` as the frontend.
## Docker support
A `Dockerfile` is included so you can also build and run the app locally in a container.
## Local testing
From `hf_space/`:
```bash
pip install -r requirements.txt
python app.py
```
Then open:
- `http://localhost:7860`
|