eelin commited on
Commit
0852a1f
·
1 Parent(s): d4144fd

Add application file

Browse files
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Python image
2
+ FROM python:3.11-slim
3
+
4
+ # Install system dependencies for OpenCV and building packages
5
+ RUN apt-get update && apt-get install -y \
6
+ libgl1 \
7
+ libglib2.0-0 \
8
+ build-essential \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Set up a new user 'user' (Hugging Face requires a non-root user)
12
+ RUN useradd -m -u 1000 user
13
+ USER user
14
+ ENV HOME=/home/user \
15
+ PATH=/home/user/.local/bin:$PATH
16
+
17
+ WORKDIR $HOME/app
18
+
19
+ # Copy requirements first for better caching
20
+ COPY --chown=user requirements.txt .
21
+
22
+ # Install dependencies (using --no-cache-dir to save space)
23
+ RUN pip install --no-cache-dir -r requirements.txt
24
+
25
+ # Copy the rest of the app
26
+ COPY --chown=user . .
27
+
28
+ # Hugging Face Spaces always expects port 7860
29
+ EXPOSE 7860
30
+
31
+ # Use Gunicorn with Eventlet to support your SocketIO connections
32
+ CMD ["gunicorn", "-k", "eventlet", "-w", "1", "-b", "0.0.0.0:7860", "run:app"]
README.md CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  # Real-time Vehicle Detection and Traffic Analysis System for Malaysia Rest & Recreation (R&R) Stops
2
  ## Description of the system:
3
  - using RF-Detr Base model (roboflow's) for detecting and classifying vehicles entering and exiting the R&R stops from surveillance footage (video file or live camera feed) into sedan, SUV, pickup, van, motorcycle, bus or truck.
 
1
+ ---
2
+ title: RR Traffic Analysis System
3
+ emoji: 🚗
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: docker
7
+ app_port: 7860
8
+ ---
9
+
10
  # Real-time Vehicle Detection and Traffic Analysis System for Malaysia Rest & Recreation (R&R) Stops
11
  ## Description of the system:
12
  - using RF-Detr Base model (roboflow's) for detecting and classifying vehicles entering and exiting the R&R stops from surveillance footage (video file or live camera feed) into sedan, SUV, pickup, van, motorcycle, bus or truck.
app/__pycache__/__init__.cpython-311.pyc CHANGED
Binary files a/app/__pycache__/__init__.cpython-311.pyc and b/app/__pycache__/__init__.cpython-311.pyc differ
 
app/__pycache__/config.cpython-311.pyc CHANGED
Binary files a/app/__pycache__/config.cpython-311.pyc and b/app/__pycache__/config.cpython-311.pyc differ
 
app/__pycache__/models.cpython-311.pyc CHANGED
Binary files a/app/__pycache__/models.cpython-311.pyc and b/app/__pycache__/models.cpython-311.pyc differ
 
app/__pycache__/state.cpython-311.pyc CHANGED
Binary files a/app/__pycache__/state.cpython-311.pyc and b/app/__pycache__/state.cpython-311.pyc differ
 
app/routes/__pycache__/__init__.cpython-311.pyc CHANGED
Binary files a/app/routes/__pycache__/__init__.cpython-311.pyc and b/app/routes/__pycache__/__init__.cpython-311.pyc differ
 
app/routes/__pycache__/dashboard.cpython-311.pyc CHANGED
Binary files a/app/routes/__pycache__/dashboard.cpython-311.pyc and b/app/routes/__pycache__/dashboard.cpython-311.pyc differ
 
app/routes/__pycache__/setup.cpython-311.pyc CHANGED
Binary files a/app/routes/__pycache__/setup.cpython-311.pyc and b/app/routes/__pycache__/setup.cpython-311.pyc differ
 
app/services/__pycache__/__init__.cpython-311.pyc CHANGED
Binary files a/app/services/__pycache__/__init__.cpython-311.pyc and b/app/services/__pycache__/__init__.cpython-311.pyc differ
 
app/services/__pycache__/firebase_service.cpython-311.pyc CHANGED
Binary files a/app/services/__pycache__/firebase_service.cpython-311.pyc and b/app/services/__pycache__/firebase_service.cpython-311.pyc differ
 
app/services/__pycache__/processing_service.cpython-311.pyc CHANGED
Binary files a/app/services/__pycache__/processing_service.cpython-311.pyc and b/app/services/__pycache__/processing_service.cpython-311.pyc differ
 
app/services/__pycache__/video_processor.cpython-311.pyc CHANGED
Binary files a/app/services/__pycache__/video_processor.cpython-311.pyc and b/app/services/__pycache__/video_processor.cpython-311.pyc differ
 
app/utils/__pycache__/__init__.cpython-311.pyc CHANGED
Binary files a/app/utils/__pycache__/__init__.cpython-311.pyc and b/app/utils/__pycache__/__init__.cpython-311.pyc differ
 
app/utils/__pycache__/math_utils.cpython-311.pyc CHANGED
Binary files a/app/utils/__pycache__/math_utils.cpython-311.pyc and b/app/utils/__pycache__/math_utils.cpython-311.pyc differ