Spaces:
Sleeping
Sleeping
A newer version of the Streamlit SDK is available: 1.55.0
Hugging Face Spaces Deployment Guide
This document provides instructions on how to deploy the Blood Cell Detection application on Hugging Face Spaces.
Prerequisites
- A Hugging Face account
- The fine-tuned YOLOv10 model file
- This repository
Steps to Deploy
1. Create a New Space
- Log in to your Hugging Face account at huggingface.co
- Go to your profile and click on "Spaces"
- Click "Create new Space"
- Configure your Space:
- Select "Streamlit" as the SDK
- Set a name for your Space (e.g., "blood-cell-detection")
- Choose visibility (Public or Private)
- Click "Create Space"
2. Upload Files
You can upload files using the Hugging Face web interface or using Git:
Option 1: Web Interface
- In your new Space, click on "Files" tab
- Upload the following files:
app.pymodel.pyutils.pyinference.py- The model weights file (e.g.,
yolov10_bccd.pt) - Additional Python files as needed
huggingface_requirements.txt(rename torequirements.txtwhen uploading)
Option 2: Using Git
- Clone the Space repository
git clone https://huggingface.co/spaces/YOUR_USERNAME/blood-cell-detection - Copy all project files to the cloned directory
- Rename
huggingface_requirements.txttorequirements.txt - Push to Hugging Face
git add . git commit -m "Initial deployment" git push
3. Configure the Space
- In your Space settings, make sure:
- The SDK is set to Streamlit
- The Python version is at least 3.9
- The hardware is appropriate (at least CPU)
4. Verify the Deployment
- Once deployed, your Space will build and start the Streamlit app
- Access your Space through the provided URL to verify it works correctly
- Test the application by uploading a blood cell image
Troubleshooting
If you encounter issues during deployment:
- Check the build logs in your Space
- Ensure the
requirements.txtfile includes all necessary dependencies - Verify the model file path in your code matches the actual file location in the Space