muhammadpriv001's picture
Frontend 1.0.0
4346a4c
|
Raw History Blame Contribute Delete
1.13 kB

A newer version of the Gradio SDK is available: 6.29.1

Upgrade

Deployment Guide: Hugging Face Spaces & Local Hosting

Hugging Face Spaces Deployment (Gradio Backend)

Deploying the Object Intelligence Platform to Hugging Face Spaces is straightforward using Gradio and Python.

Steps to Deploy on HF Spaces:

  1. Create Space: Go to Hugging Face Spaces and create a new Space. Select Gradio as the Space SDK.
  2. Repository Upload: Push all repository files (app.py, requirements.txt, backend/, object_intelligence/, docs/, examples/).
  3. Automatic Dependency Resolution: HF Spaces reads requirements.txt and automatically installs ultralytics, torch, torchvision, gradio, fastapi, and dependencies.
  4. ZeroGPU / GPU Acceleration: If using Hugging Face ZeroGPU or T4 GPU Space, PyTorch and Ultralytics automatically leverage CUDA acceleration. On standard CPU Spaces, PyTorch automatically runs CPU inference.

Local Deployment

# Install dependencies
pip install -r requirements.txt

# Run app
python app.py

The application will launch a Gradio interface at http://0.0.0.0:7860.