Skip to content

Commit 0fa5187

Browse files
committed
Updated README with PSQL instructions, bumped tensorflow version
1 parent 14cee03 commit 0fa5187

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,47 @@ There is a short demo of the first version on YouTube: https://youtu.be/86HhxTRL
4141

4242
# Developers stuff
4343

44+
**DB creation**
45+
46+
You need PostgreSQL installed on your machine. To facilitate the configurations and if you are not familiar with PostgreSQL commands, I suggest to use a Db manager with UI: in my case, I use [pgAdmin](https://www.pgadmin.org/).
47+
48+
After the installation of PostgreSQL, use pgAdmin to create a ```django-emotion-classification``` database and a ```App_filemodel``` table.
49+
50+
The ```App_filemodel``` table can be created with the following script:
51+
52+
```
53+
CREATE DATABASE django-emotion-classification;
54+
55+
CREATE USER marco WITH PASSWORD 'test';
56+
57+
CREATE TABLE App_filemodel (
58+
id INT PRIMARY KEY NOT NULL,
59+
file TEXT NOT NULL,
60+
timestamp DATE NOT NULL,
61+
path TEXT NOT NULL
62+
);
63+
64+
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA django-emotion-classification TO marco;
65+
66+
ALTER USER marco CREATEDB; -- This is to run the automatic tests, otherwise you will get an "unable to create database" error when running python manage.py test
67+
68+
```
69+
70+
Please note the above script is made with the data available in my settings.py, but you can change it according to your needs.
71+
```
72+
DATABASES = {
73+
'default': {
74+
'ENGINE': 'django.db.backends.postgresql_psycopg2',
75+
'NAME': 'django-emotion-classification',
76+
'USER': 'marco',
77+
'PASSWORD': 'test',
78+
'HOST': 'localhost',
79+
'PORT': '',
80+
'OPTIONS': {'sslmode': 'disable'},
81+
}
82+
}
83+
```
84+
4485
**How to start the server and try it**
4586

4687
1) ```git clone https://github.com/marcogdepinto/Django-Emotion-Classification-Ravdess-API.git```

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ numba==0.49.0
1111
numpy==1.16.0
1212
pandas==1.0.3
1313
pytest==5.4.1
14-
tensorflow==1.14.0
14+
tensorflow==1.15.2
1515
psycopg2==2.8.4
1616
requests==2.23.0
1717
setuptools==46.1.3

0 commit comments

Comments
 (0)