Skip to content

Commit

Permalink
Fix requirements (#6)
Browse files Browse the repository at this point in the history
* updare readme

* add components
  • Loading branch information
kzaleskaa authored Jan 20, 2024
1 parent 0abe25f commit f95e8b7
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion GUI/DetectionWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtGui import QIcon, QImage, QPixmap
from PyQt5.QtWidgets import QDialog

from GestureRecognitionThread import GestureRecognitionThread
from components.GestureRecognition import GestureRecognitionThread
from pyui.DetectionWindow import Ui_DetectionWindow


Expand Down
2 changes: 1 addition & 1 deletion GUI/MainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from GUI.DetectionWindow import DetectionWindow
from pyui.StartWindow import Ui_MainWindow
from spotify.Spotify import SpotifyAPI
from components.Spotify import SpotifyAPI


class MainWindow(QMainWindow, Ui_MainWindow):
Expand Down
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
<img src="https://user-images.githubusercontent.com/62251989/149663561-90e99712-58a9-40c6-9822-69a7092d582b.png" alt="Spotify Gesture Controller logo"/>
</div>



## 📝 Description

Spotify Gesture Controller is a project realised during "Programming in functional languages" course. The main goal was create the app, which can:

- play/pause current track
Expand All @@ -16,39 +15,45 @@ Spotify Gesture Controller is a project realised during "Programming in function
using hand gestures. To do this, **Python 3.9** was used with **OpenCV** and **MediaPipe** libraries. **Tensorflow** model was trained on custom dataset, which was created by myself.

## 🏃‍ How to install and run it?

**Remember: to use this app you need to have premium version of Spotify.**

1. Download repository
```
```
git clone https://github.com/kzaleskaa/hand-gesture-recognition.git
cd hand-gesture-recognition
```
2. Create a new project at [Spotify Dashboard](https://developer.spotify.com/dashboard/) and edit settings - add ```http://localhost:8888/spotify-api/callback/``` in Redirect URLs.
3. Create your conda environment and install all requirements
2. Create a new project at [Spotify Dashboard](https://developer.spotify.com/dashboard/) and edit settings - add `http://localhost:8888/spotify-api/callback/` in Redirect URLs.
3. Create your environment and activate it
```bash
$ python -m venv venv
```
4. In root project directory, create .env file with following content (from your Spotify Dashboard):
4. Install requirements
```bash
$ pip install -r .\requirements.txt
```
5. In root project directory, create .env file with following content (from your Spotify Dashboard):
```
CLIENT_ID=<YOUR CLIENT ID>
CLIENT_SECRET=<YOUR CLIENT SECRET>
```
5. Start app
6. Start app
```
python main.py
```
6. Open your spotify app, start play music and use this app to control it
7. Open your spotify app, start play music and use this app to control it

## ✋ Gestures

![ezgif com-gif-maker (9)](https://user-images.githubusercontent.com/62251989/150003931-1bb5ec49-8f3a-4c2e-8ed4-a12f89ddafe2.gif)


## 🎶 Spotify API
>Based on simple REST principles, the Spotify Web API endpoints return JSON metadata about music artists, albums, and tracks, directly from the Spotify Data Catalogue.

> Based on simple REST principles, the Spotify Web API endpoints return JSON metadata about music artists, albums, and tracks, directly from the Spotify Data Catalogue.
If no action on Spotify is made, please open your app and start play music manually. Then, you can use this app to control it.

## 🖊 Credits

- Heart photo created by nakaridore - [Freepik](www.freepik.com)
- Icons - [Flaticon](Flaticon.com)
- Icons - [Flaticon](Flaticon.com)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from PyQt5.QtGui import QImage

from constants import ACTIONS, THRESHOLD
from spotify.Spotify import SpotifyAPI
from components.Spotify import SpotifyAPI


class GestureRecognitionThread(QThread):
Expand Down
3 changes: 0 additions & 3 deletions spotify/Spotify.py → components/Spotify.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Katarzyna Zaleska
# WCY19IJ1S1

import os

import requests
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions pyui/StartWindow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Katarzyna Zaleska
# WCY19IJ1S1

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'StartWindow.ui'
Expand Down

0 comments on commit f95e8b7

Please sign in to comment.