diff --git a/.vscode/launch.json b/.vscode/launch.json index 49f9a44..e201618 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -34,6 +34,14 @@ "DOCS_URL": "/docs", "REDOC_URL": "/redoc" }, + "osx": { + "env": { + "APP_URL": "http://localhost:3000", + "DOCS_URL": "/docs", + "REDOC_URL": "/redoc", + "HACKINTOSH": "1" + } + }, "module": "uvicorn", "args": [ "backend.main:app", diff --git a/app.json b/app.json index 65c6124..c35e80d 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,7 @@ "name": "Deej-A.I.", "slug": "DeejAI", "entryPoint": "./src/index.native.js", - "version": "2.0.0", + "version": "2.0.1", "userInterfaceStyle": "dark", "android": { "package": "online.deejai", @@ -11,7 +11,10 @@ }, "ios": { "bundleIdentifier": "online.deej-ai", - "buildNumber": "2.0.0" + "buildNumber": "1", + "supportsTablet": true, + "backgroundColor": "#000000", + "userInterfaceStyle": "dark" } } } diff --git a/backend/deejai.py b/backend/deejai.py index 5b0d498..9e889f3 100644 --- a/backend/deejai.py +++ b/backend/deejai.py @@ -14,8 +14,9 @@ import numpy as np from starlette.concurrency import run_in_threadpool -import tensorflow as tf -from keras.models import load_model +if 'HACKINTOSH' not in os.environ: # can't get tensorflow to work on Hackintosh due to missing AVX support + import tensorflow as tf + from keras.models import load_model class DeejAI: @@ -46,11 +47,12 @@ def __init__(self): self.mp3tovecs = np.array([[mp3tovecs[_], tracktovecs[_]] for _ in mp3tovecs]) del mp3tovecs, tracktovecs - self.model = load_model('speccy_model', - custom_objects={ - 'cosine_proximity': - tf.compat.v1.keras.losses.cosine_proximity - }) + if 'HACKINTOSH' not in os.environ: + self.model = load_model('speccy_model', + custom_objects={ + 'cosine_proximity': + tf.compat.v1.keras.losses.cosine_proximity + }) def get_tracks(self): """Get tracks. diff --git a/src/index.native.js b/src/index.native.js index 41a8e08..97866dd 100644 --- a/src/index.native.js +++ b/src/index.native.js @@ -1,5 +1,4 @@ // TODO: -// Routes // Previous // Footer // Spotify login @@ -14,8 +13,7 @@ import App from './components/App'; global.Buffer = global.Buffer || require('buffer').Buffer; global.localStorage = global.localStorage || require('localStorage'); -//process.env.REACT_APP_API_URL = 'https://deej-ai.online/api/v1'; -process.env.REACT_APP_API_URL = 'http://192.168.0.225:8001/api/v1'; +process.env.REACT_APP_API_URL = 'https://deej-ai.online/api/v1'; const theme = { ...DarkTheme,