File size: 1,178 Bytes
d2dd627
c8640b7
d2dd627
 
 
 
 
c8640b7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
title: DV CON design contest
sdk: gradio
app_file: app.py
pinned: false
---

# DV CON design contest

This is a simple Proof of Concept for task-based object detection on PC (CPU-first), intended as a functional baseline before FPGA deployment work.

Pipeline:
1. Capture or upload an image in Gradio.
2. Run YOLOv5n detection using Ultralytics.
3. Encode the user task prompt and detected object labels using `msmarco-MiniLM-L6-v3`.
4. Compute cosine similarity and highlight the closest object.

## Setup

```powershell
pip install -r requirements.txt
```

## Run

```powershell
python app.py
```

Open:
- http://127.0.0.1:7860

## Example prompt
- `I need to sit`

## Deploy To Hugging Face Spaces

1. Create a new Space in your Hugging Face account.
2. Choose Gradio SDK.
3. Set the Space name you want (for example: dv-con-design-contest).
4. Push this project to that Space repository.

Quick git flow:

```powershell
git init
git add .
git commit -m "Initial DV CON design contest app"
git remote add origin https://huggingface.co/spaces/<your-username>/<your-space-name>
git push -u origin main
```

After push, Hugging Face builds automatically and hosts your app.