From f138dc39d87d10b5ea67d87c03ad2fdec188821f Mon Sep 17 00:00:00 2001 From: Kasidit0052 Date: Sat, 18 Jun 2022 11:38:42 +0700 Subject: [PATCH] improve python interface --- .DS_Store | Bin 6148 -> 0 bytes .gitignore | 3 + electron-react-boilerplate/.DS_Store | Bin 12292 -> 0 bytes electron-react-boilerplate/.erb/.DS_Store | Bin 6148 -> 0 bytes electron-react-boilerplate/assets/.DS_Store | Bin 6148 -> 0 bytes electron-react-boilerplate/package.json | 5 +- electron-react-boilerplate/release/.DS_Store | Bin 6148 -> 0 bytes electron-react-boilerplate/src/.DS_Store | Bin 8196 -> 0 bytes electron-react-boilerplate/src/App.global.css | 33 ++++- electron-react-boilerplate/src/App.tsx | 134 ++++++++++-------- electron-react-boilerplate/src/main.dev.ts | 98 +++++++------ .../stylegan2_pytorch/.DS_Store | Bin 10244 -> 0 bytes .../pretrained_model/.DS_Store | Bin 6148 -> 0 bytes .../modded_dlatents/.DS_Store | Bin 6148 -> 0 bytes .../stylegan2_pytorch/stylegan2/.DS_Store | Bin 8196 -> 0 bytes 15 files changed, 166 insertions(+), 107 deletions(-) delete mode 100644 .DS_Store delete mode 100644 electron-react-boilerplate/.DS_Store delete mode 100644 electron-react-boilerplate/.erb/.DS_Store delete mode 100644 electron-react-boilerplate/assets/.DS_Store delete mode 100644 electron-react-boilerplate/release/.DS_Store delete mode 100644 electron-react-boilerplate/src/.DS_Store delete mode 100644 electron-react-boilerplate/stylegan2_pytorch/.DS_Store delete mode 100644 electron-react-boilerplate/stylegan2_pytorch/pretrained_model/.DS_Store delete mode 100644 electron-react-boilerplate/stylegan2_pytorch/pretrained_model/modded_dlatents/.DS_Store delete mode 100644 electron-react-boilerplate/stylegan2_pytorch/stylegan2/.DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 0384fae7b24dd00fe185d8d2b0d2e3e3ee62231c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKL5tHs6n?W?HC5Ce1Q$;M@z!11r4~emSi8a=1TmrqmEEKX+d!HrX=>5hCE$+` z{S#gVFXGK#;9n5@5&FHEQFmSS5JbeC7v6ktX5M?re3{H-h)DFNQJbhiL=Kd(b{xe| zg!@?!$dYN{PN8xXl#`^4R)JP51D1h*odN!K&rwV%bU=H*-U{%Z+&L(4%^L;o@lS$EPeGp5_wIfH5IdxnoornHV&io=M zrjuTf-{;z`pcsb6z9VJ&%?`r5Nj%$XoVhNuB1p10SHVdX!{x!fB#Y#%C#P97QF(mb z!S|_eHCE>H?s})`UhK9OO?Q52z14I(-OgfBcg|jDU)|guJ$^EOy4Zc8hD!nqppw%D zzrsrxl?YCE+WtU}#+>NN>)kh1^NeJ_Z%B2{pZfIt*~fSMvMN2(NJf7w*Le7Sd^aw? z#UoXFrbm9Br83(=JimiF-KGsp$3EQzuF;61AExRnch8$zDt8i|Mq642ECc%)Sk~1B@BbUWKL76zvNg+qW#GSJK-Btv zzlR~2z4gH0c&~M#+fWwvD>bSR6lObC25-eHP$lSd*#LS5OO0rO*dGB!gDorrf0cnR Dwkg97 diff --git a/.gitignore b/.gitignore index 6704566..6c4f60d 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,6 @@ dist # TernJS port file .tern-port + +# Mac .DS Store +.DS_Store diff --git a/electron-react-boilerplate/.DS_Store b/electron-react-boilerplate/.DS_Store deleted file mode 100644 index cd14ff879136525f736c437f7ea3f62206011645..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12292 zcmeHNPiz!b82=s=x(mB>`xg*_)dnS@Hl>srB*tZF#R{^uTd~+;ncbakM`mZ%*=cJj zg}sB-1n% zNJnh-hc&1ouYVJ+2x+3$)%wqoiq@1e3#DR4)icofE>l#MlG)ey6I-*kY2EtfP#C{x z=u~=EUr3vhIaf+b#w7nYDw(qxJ3g-KsuPzoClq;MI@WPm*Gx&#WJ4G$ITx%DtJr;Ak z-whih(M>I}*0%Q6j@Hi3uFYFIx3+D2a5~nWk+Ns<2KQqR>#A-f)j4@O)>49JJd)M5 zQA3`G7d&CgubFA(ERx!M24iyWLtZgbnWDnDBY9`Bif9P5_t_$MV?eTAsZ#g8k>oel3_?%UQRBaQl*TnrnIDP zntEYEK`VI8MUm;ElvT8R_fvmZ0EfF1yRBG^x+|D>C$3D1cqqokHC>aTHEJbxCyv@$ zA=*QSC{0uJDwXLS`iL&mH}pOIN`KNV7G+)RVYY|$u>I_DmS7|7S$2#)&&JrKWxvK= z9BI3qpDkDpk%qmj=J%$vdZEabcV(Zrc01jIJ~U*rA)#}Vmrh;z?dqZ1>*wxBzc^d1 zOYaY&N)78hpEfjA*YYTzw>v^bk|;}OaL7`ew1WrdAQT41{=NNV@uHSo01jLBK zG)BWfeTbfe>;-$3^I9N{=zW((Ga1OAvqKU}kZZNsrpDU$B%cI;e4zL`XDxs-DC>jj zvJY5W>t2P(Zk~I-(e^LD00?%9dv-F)0BI{w($ z%B1#dUaUbnWcNkbiI^7MOV^3-*Adz*px76u+Y*BDOh?NEWC_w zO73A4#*mXR;51mMu*cHv9eC_bp9QaB5CQ}O1OfyC1OfyC1nwFEz9~ns0n2z}uQ(?_ zXEXP1$aD;@R>|etGzm+CGCn;V>^(k^qqoY=g#&|wJ@Nj5!Mi>eIt_H6{^-&N2LZ2> z=04+fq-J-{TW361di5k%FWr4!qmL83?;Ts;sVpKori62qg7cM$vlVxZXZ_A9KVh-+ zt`4<^Le-9+=lF*aaCp64%ujQkF7}tm9SLy~^x5$ez3y=@&D$qPd_LmS=B2pn*Ni+} z+8(s2`73r*Y^1kK@S;h>h3H1FIRi^JqqSBhVg(U7CiyD+0Ue({4y@*0HO4&OWlnjsG3^ z|ES73TnM{2;x^p)`#+%++yVpw1nx})Skq8?D2cXJULX0J$=|idah=A+1J^6_2m<2b rRXn746%Q$1#Y6U48bT*w>y|BvRD}QiBY@kyFbwwpVE@0L_W!>DOKVlj diff --git a/electron-react-boilerplate/.erb/.DS_Store b/electron-react-boilerplate/.erb/.DS_Store deleted file mode 100644 index 5b81d16a23dd14816cf275f1de2c0dcd11860764..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKK~4fO6#W&5s2esU8e=ke0230ICXQrWxaI-|h)A4qi0FP61Wnj@4mVtZxb_(C zUAxlv+cLBi5?4k{f6~60{`cF*1KJrP5{-vWov1=YWi-a(Ho7Ijd2UW@=#f33kaP5? zOM{CzZMR~F?FYOA-hsd70RMM4sZA-}(iIv1-?W7cZwqH=M_)2<<*?&!z1dEazRc0d zzRO6`C~C!WzH~LY8fwDpbo_pt6e8oJwe7)tyz}Z;bb(g zH&vFZZ&R&O*O}_vtfgu=#iUTxqlCJ)Dsg~}txB>iRkabjqw7soTcf9$cX@X1nVYp# z9fp{cO3;+z+rF9Y(lfur7+F)9!L-y7)$Dmpg&*Twp;2#ox13=ql|MTCItI{r2N(Nv z@2LG;P`kjk6<3eJUSOE2<4LaCVa@$r&9c=$W3e>}p>&pa)1Y;`^y vpS1znB^n3wGKI1Poj#7`1s}z`Xflus_yQPe%oJh-;U5H~4ZiaZ{Hg=rHEHA$ diff --git a/electron-react-boilerplate/assets/.DS_Store b/electron-react-boilerplate/assets/.DS_Store deleted file mode 100644 index c069b04ddccc173299e233bcdf959dbf0c8dd630..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&u`N(6n^eHmM|fDKx4;TI3QJ3$Ht@`&_Wr9-H?Ld0BB2^YKxS{Rg8Cek5OIJ0>F08O0k!4I*-&3hVdLTq9~;>4MaF z#03hSqoABx6hn&zZ#!TaungQa2GrVJr4Z{jryf@ApY@yXr?MNRGJ=QN9=<`JUTA?u zv1}OqO{cE&_{qkL{lot0=gF7p z*E760L}0_$@{n-`-(g%K<0KensmzWrI*XWjTD)Zj_z!VbZ}~ZFdCP!h;O;S?_6HBD z&}S?S>a7Efz5)R27}f$?eJrRLkI`o=4Ppi&OeoNV3cg|p6OM6@{d~sKpb00zmk+^} z1>aDFu8#bkb|>K*w5?^pGBD4;lIb?o`TzRw_y74I+p`Q<2L3AsM13#V>)@66Y+ZOc wb=G>&L#PtvR~pnIX!tnRhB}JZp;|EKDFf&;mIg5bu^$4O2HRK${wV{$0VR*IfdBvi diff --git a/electron-react-boilerplate/package.json b/electron-react-boilerplate/package.json index ec074a3..7522698 100644 --- a/electron-react-boilerplate/package.json +++ b/electron-react-boilerplate/package.json @@ -1,6 +1,6 @@ { "name": "electron-react-boilerplate", - "productName": "ElectronReact", + "productName": "StyleGAN Electron", "description": "Electron application boilerplate based on React, React Router, Webpack, React Fast Refresh for rapid application development", "scripts": { "build": "concurrently \"yarn build:main\" \"yarn build:renderer\"", @@ -30,7 +30,7 @@ ] }, "build": { - "productName": "ElectronReact", + "productName": "StyleGAN Electron", "appId": "org.erb.ElectronReact", "files": [ "dist/", @@ -253,6 +253,7 @@ "electron-debug": "^3.1.0", "electron-is-dev": "^1.2.0", "electron-log": "^4.2.4", + "electron-store": "^8.0.2", "electron-updater": "^4.3.4", "express": "^4.17.1", "history": "^5.0.0", diff --git a/electron-react-boilerplate/release/.DS_Store b/electron-react-boilerplate/release/.DS_Store deleted file mode 100644 index b745d7923a1a2221bccc24b63c40825402bd5d73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&2G~`5T0!UbwEH4NbRN4UbrPynwGX4kW6R~y&;U?0I0QNH?`_|Bim^dLXht~ z0ey)+2T#DWaDs1tf=E&hTu_8|qSe5 z*!bVEfi=MB0;8RS-KYK>|K~aW`^fe&o^)7 z*B?F?Y2n9dl&Ru4jF9r~O`L{e*b##?%oUHPZ^&_K$MyB`cz>_m;MFPqQp8kpkw= zaqceBGucP63Rne}Ljn1I;Bbkq!BV4ob)Zp40ALl}$`H#B0a?Qhx&}*)xC3Ll6sSv? zIbtwfj(%?PT!W=XT~5p#KA0JqnG*_Aql2HTbYiYX+gb&z0<#KK^krS{|A&7*|IZfL zE31H2;J;FURS&#_4yI)G)`iK*y_UmI;L>DXsZo`nG25{U}DUN9A&E22DiaGy~(n0PbvF z;v?>Te^j@c0nNaF$pDWJ1}c|XDF?n3p#zOb0U%>|EDHL_0|ds9GArf4mja48{p^8B zD3d7$^WhjbxH@E3%7HI^I58hiOs>pihQh?^z!^fFSk{-i)eL9`_A|h9_XN+_k-1mY z{N3HOY}djlcc@FKsUM=C7m2XCt)@i0x0-gn)lR2Bu!+gok*Vo;0-s~?+r^sOEw;^e zrCi)#S`FqxdN42H|kE=?dIH$Q*McQ ziv9p!CsCS9_Ik^UEAz%uda*xm^j0pU=Z(yArr%G*Pn}!1SlDRn-0R)%KX@iyhM0^g zbi)5WY@bKJs$E?uZn}-8)cYE()o}B9Nl5(T_s7kbpWkvCBgk&JKK<(JfOOf`^)=b!F)Uxa}u<9lWi zH6AdAsVt`6n>%CzM{z6;4yQufIQSZTy+L;Hkk}L8)uT@YFj2?7`TINz=TyNk@0YM|uaY&JlLk|C8h`s?;j>$?n@Fkw0{PiCKEG)X4)2QK9-~Xof2lA(p MceK9$|LOhz6WY7Hx&QzG diff --git a/electron-react-boilerplate/src/App.global.css b/electron-react-boilerplate/src/App.global.css index f09f7e9..1cfa9dc 100644 --- a/electron-react-boilerplate/src/App.global.css +++ b/electron-react-boilerplate/src/App.global.css @@ -2,7 +2,7 @@ * @NOTE: Prepend a `~` to css file paths that are in your node_modules * See https://github.com/webpack-contrib/sass-loader#imports */ -body { + body { position: relative; color: white; height: 100vh; @@ -50,9 +50,38 @@ a:hover { cursor: pointer; } -.Hello { +.Title { display: flex; justify-content: center; align-items: center; margin: 20px 0; } + +.Image { + display: flex; + justify-content: center; + align-items: center; + margin: 20px 0; +} + +.Parameter { + display: flex; + justify-content: center; + align-items: center; + margin: 20px 0; +} + + +.Button { + display: flex; + justify-content: center; + align-items: center; + margin: 20px 0; +} + +.PythonInterface { + display: flex; + justify-content: center; + align-items: center; + margin: 20px 0; +} \ No newline at end of file diff --git a/electron-react-boilerplate/src/App.tsx b/electron-react-boilerplate/src/App.tsx index 85738b3..a9f1929 100644 --- a/electron-react-boilerplate/src/App.tsx +++ b/electron-react-boilerplate/src/App.tsx @@ -1,10 +1,11 @@ -import React,{Fragment, useState} from 'react'; +import React, { Fragment, useState } from 'react'; import Slider from '@material-ui/core/Slider'; +import TextField from '@material-ui/core/TextField'; import { withStyles } from '@material-ui/core/styles'; import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; import './App.global.css'; //Import Inter-Process Communication -const ipcRenderer = window.require("electron").ipcRenderer; +const ipcRenderer = window.require("electron").ipcRenderer; //Create a slider style const PrettoSlider = withStyles({ @@ -41,115 +42,136 @@ const MainFrame = () => { // Number of slider per row const chunkSize = 5; + // Application State + const [isSetupReady, setIsSetupReady] = useState(false); + // Python Path + const [pythonPath, setPythonPath] = useState(''); // Variable to store ImageURI - const [imageData, setImageData] = useState() + const [imageData, setImageData] = useState(); // Variable to Loop Create Slider - const [chunklists,setChunkLists] = useState([[],[]]) + const [chunklists, setChunkLists] = useState([[], []]); // List of all avaiable tag - const [lists, setlists] = useState([]) + const [lists, setlists] = useState([]); // Variable to store TagValue - const [tagValue, setTagValue] = useState<{}>({"test":1.0}) + const [tagValue, setTagValue] = useState<{}>({ "test": 1.0 }); // Handle on Slider Value Changes - function handleInputChange(event,value,id) - { + function handleInputChange(event, value, id) { interface CustomDict { [index: string]: number; } let updatedValue: CustomDict; - let updatedKey = id.item - updatedValue = {} - updatedValue[updatedKey] = value - setTagValue({...tagValue, ...updatedValue}); + let updatedKey = id.item; + updatedValue = {}; + updatedValue[updatedKey] = value; + setTagValue({ ...tagValue, ...updatedValue }); } // handle on Create New Image - function handleOnCreate(){ - console.log("generate new images") - ipcRenderer.send('creation_event') + function handleOnCreate() { + console.log("generate new images...."); + ipcRenderer.send('creation_event'); } // handle on Modify Current Image - function handleOnModify(){ - console.log("modify images") - ipcRenderer.send('modification_event',tagValue) + function handleOnModify() { + console.log("modify images...."); + ipcRenderer.send('modification_event', tagValue); + } + + // setup Python Interface + function setupPythonPath() { + console.log("setup python path...."); + ipcRenderer.send('pythonpath_init', pythonPath); } // handle Create Slider UI - function handleSetChunk(){ - const groups = lists.map((e, i) => { - return i % chunkSize === 0 ? lists.slice(i, i + chunkSize) : ["null"]; - }).filter(function (el) {return el[0] !== "null";}); - setChunkLists(groups) + function handleSetChunk() { + const groups = lists.map((e, i) => { + return i % chunkSize === 0 ? lists.slice(i, i + chunkSize) : ["null"]; + }).filter(function (el) { return el[0] !== "null"; }); + setChunkLists(groups); } - function handleCreateTagValue(){ - var tag_value_obj = lists.reduce((o, key) => Object.assign(o, {[key]: 0.0}), {}); - setTagValue(tag_value_obj) + function handleCreateTagValue() { + var tag_value_obj = lists.reduce((o, key) => Object.assign(o, { [key]: 0.0 }), {}); + setTagValue(tag_value_obj); } // General state changes listener React.useEffect(() => { // Event Listener for changing image in Real-Time - ipcRenderer.on('inference image', (event, value) => { + ipcRenderer.on('Inference Image', (event, value) => { console.log(`Image name:${value.image_name}`); setImageData(value.image_data); - }) + }); // Event Listener for initialization ipcRenderer.on('Init Interface', (event, value) => { setlists(value); - }) + }); + ipcRenderer.on('Get Python Path', (event, value) => { + setPythonPath(value); + }); + ipcRenderer.on('Init Ready', (event, value) => { + setIsSetupReady(value); + }); }, []) // This is be executed when 'list' state changes (for initialization) - React.useEffect(() => { - handleSetChunk(); + React.useEffect(() => { + handleSetChunk(); handleCreateTagValue(); - console.log("state changes") }, [lists]) return (
-
-

electron-stylegan-interface

+
+

Electron StyleGAN2

-
- +
+
-
- - +
+
+ { chunklists.map((chunk) => ( { chunk.map((item) => ( - - - - + + + + )) } )) } - -
- handleInputChange(event,value,{item})}/> - - {item} - + handleInputChange(event, value, { item })} /> + + {item} +
+ + +
+ +
+ { setPythonPath(event.target.value) }} /> +
-
- - +
+ +
diff --git a/electron-react-boilerplate/src/main.dev.ts b/electron-react-boilerplate/src/main.dev.ts index 9fc3947..99851ec 100644 --- a/electron-react-boilerplate/src/main.dev.ts +++ b/electron-react-boilerplate/src/main.dev.ts @@ -13,25 +13,24 @@ import 'regenerator-runtime/runtime'; import path from 'path'; import { app, BrowserWindow, shell, ipcMain } from 'electron'; import { autoUpdater } from 'electron-updater'; -import {PythonShell} from 'python-shell'; +import { PythonShell } from 'python-shell'; import log from 'electron-log'; import MenuBuilder from './menu'; -// Import Socketio Related Libraries +// Import Related Libraries const express = require('express'); const _app = express(); const server = require('http').Server(_app); const io = require('socket.io')(server); +const Store = require('electron-store'); +const store = new Store(); // Import Development Libraries const isDev = require('electron-is-dev'); // On Socketio Client Connected io.on('connection', (socket) => { - - // Initialize image when app opened io.emit('create_new_image'); - console.log('a user connected'); // Event on user disconnect socket.on('disconnect', () => { @@ -40,10 +39,9 @@ io.on('connection', (socket) => { // Pytorch Interface Event Listener socket.on('inference image', (msg) => { - console.log('image_name: ' + msg.image_name); - mainWindow.webContents.send('inference image', msg); + mainWindow.webContents.send('Inference Image', msg); }); - + // Event for initialize User Interface socket.on('Init Interface', (msg) => { mainWindow.webContents.send('Init Interface', msg); @@ -109,8 +107,10 @@ const createWindow = async () => { mainWindow = new BrowserWindow({ show: false, - width: 1024, - height: 728, + width: 1096, + height: 956, + minWidth: 1096, + minHeight: 956, icon: getAssetPath('icon.png'), webPreferences: { nodeIntegration: true, @@ -122,33 +122,6 @@ const createWindow = async () => { // @TODO: Use 'ready-to-show' event // https://github.com/electron/electron/blob/master/docs/api/browser-window.md#using-ready-to-show-event mainWindow.webContents.on('did-finish-load', () => { - console.log("finished loading"); - - if (isDev) { - // Running in Development Mode - const app_path = app.getAppPath().split("/"); - const base_app_path = app_path.slice(0, app_path.length-1).join("/"); - const StyleGANPATH = path.join(base_app_path, 'stylegan2_pytorch'); - process.chdir(StyleGANPATH); - - // Running Python Backended Script !!!!! - var pyshell = PythonShell.run('socket_inference.py',{scriptPath: StyleGANPATH ,pythonPath: '/Users/webkasidit/opt/anaconda3/envs/StyleGAN/bin/python' }, function (err, results) { - if (err) throw err; - console.log('Script Passes'); - }); - console.log('Running in development'); - } else { - // Running in Production Mode - const StyleGANPATH = path.join(process.resourcesPath, 'stylegan2_pytorch'); - process.chdir(StyleGANPATH); - // Running Python Backended Script !!!!! - var pyshell = PythonShell.run('socket_inference.py',{scriptPath: StyleGANPATH ,pythonPath: '/Users/webkasidit/opt/anaconda3/envs/StyleGAN/bin/python' }, function (err, results) { - if (err) throw err; - console.log('Script Passes'); - }); - console.log('Running in production'); - } - if (!mainWindow) { throw new Error('"mainWindow" is not defined'); } @@ -158,6 +131,7 @@ const createWindow = async () => { mainWindow.show(); mainWindow.focus(); } + mainWindow.webContents.send('Get Python Path', store.get('python_path')); }); mainWindow.on('closed', () => { @@ -184,25 +158,55 @@ const createWindow = async () => { // Listening Creation Event from Render process ipcMain.on("creation_event", () => { - console.log('Generate New Samples'); // Send Command through Socketio io.emit('create_new_image'); -}) +}); // Listening Modification Event from Render Process -ipcMain.on("modification_event", (event,args) => { +ipcMain.on("modification_event", (event, args) => { // Send Command through Socketio - io.emit('modify_current_image',args); -}) + io.emit('modify_current_image', args); +}); -app.on('window-all-closed', () => { - // Respect the OSX convention of having the application in memory even - // after all windows have been closed - if (process.platform !== 'darwin') { - app.quit(); +// Listening Python path initialization event from Render Process +ipcMain.on("pythonpath_init", (event, args) => { + // Set Python Path in persistant storage + store.set('python_path', args); + if (isDev) { + // Running in Development Mode + const app_path = app.getAppPath().split("/"); + const base_app_path = app_path.slice(0, app_path.length - 1).join("/"); + const StyleGANPATH = path.join(base_app_path, 'stylegan2_pytorch'); + process.chdir(StyleGANPATH); + // Running Python Backended Script + PythonShell.run('socket_inference.py', { scriptPath: StyleGANPATH, pythonPath: store.get('python_path') }, function (err, results) { + if (err) throw err; + }); + mainWindow.webContents.send('Init Ready', true); + console.log('Running in development'); + } else { + // Running in Production Mode + const StyleGANPATH = path.join(process.resourcesPath, 'stylegan2_pytorch'); + process.chdir(StyleGANPATH); + // Running Python Backended Script + PythonShell.run('socket_inference.py', { scriptPath: StyleGANPATH, pythonPath: store.get('python_path') }, function (err, results) { + if (err) throw err; + }); + mainWindow.webContents.send('Init Ready', true); + console.log('Running in production'); } }); +// Second Layer Exception Caughting +process.on('uncaughtException', function (error) { + mainWindow.webContents.send('Init Ready', false); +}); + +app.on('window-all-closed', () => { + app.quit(); + +}); + app.whenReady().then(createWindow).catch(console.log); app.on('activate', () => { diff --git a/electron-react-boilerplate/stylegan2_pytorch/.DS_Store b/electron-react-boilerplate/stylegan2_pytorch/.DS_Store deleted file mode 100644 index edd7993fb9ea37a9e1a56d027593e695951af308..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHMO=}ZD7=EW#o8U)-^`jSIK?Dz_q#qVM2r)*bqD779K_$&s)97X=CYx4`mE65} zR6+d#BKjLd5PyLe&-xoY>GRI4>FjoEtAZ4nDLe1%?EB0+`^+=5oe2?%Y^O3oWHE`K^R*@o1T}|Y1@J^3m8d{vTBPb4Z(Cs*unbrRECZGS%fMD(0N-p*iJjWo z+%jMpunhDW;Pt`5#WoYzp0;Y~K&G|;u!E>p31#d96vhc`Ca^ti6%=ji-Gd0ABG_UG z4aakb-C;93+?x-Z#WiFuS8`N=ax}nA1@&$i zFCGE);&uo=s{v-yr4Q}5tlt|)lcj9J#Q7-5GqTgv}i>>Q?cd_U% zmV)vXDcyd#Sh`xTE*Db!PD#%%*1c*=f$NnjTy9*edlk8yl^w6rR_)~V1CEm{q(-~l znaSxf=h#eoWz6XwpG=QA(=*d6E6K#cBNHcP=NtF#cOR@ge5$A+5v;~Etnd5zGn6(Y z&Xm;t$M;7zgE8gw^7-ef;jc4)Jm0r2lc&!R+eJ@i+G&+x9(P$CT9KaBE zFz9@mDq)u(fffd{Knt)Ek|^MA0fNA~9Ufq{0!8Jd+o~xcaZ5#@C2So28+vEr_rOo% zS%|z2*3qkW99D_T#HRXKUPUF{LJQ^fW2@EI6z6aszqntJ%V0J#JjEf zT~Mp{0?It8Jk(d?S`qyIW-Cdw;^XV+!oLRQJerI!&J%D0#Q!?2V#onr1`u2pktVGSv>!706pphdPGW#nhUEYFL8gx5VbyUwZumI-hw3d4-_nH(|G7jSkXh3bhjIth25Qy-54~D?9rom z(~slLPvA%JW9WNtUZo|fQL@lxP{42jOxjk zY(+}e5Eb_^gct_sDTGU{U4c`;De$i;Kznx`GBCJnW4OG3OU&g^LUELu(ObSdJoz zpBR(=h{Nb=3WI&HnZyS-R6y}S3i`$s3)tJm}M#hVYjFi?1?v8@YUz()*fL`%=Q!Kul{ zOxZbpSI@{yzb`_0Z{Ht0-1z#5q^=n!Gx2Y*#-mHK+viEvjPo*>bfjC;w7pyE|4Vto4 zL`zlj#88%w RC1~zLfMsxrQ{b;E@EstgmI43( diff --git a/electron-react-boilerplate/stylegan2_pytorch/pretrained_model/modded_dlatents/.DS_Store b/electron-react-boilerplate/stylegan2_pytorch/pretrained_model/modded_dlatents/.DS_Store deleted file mode 100644 index d6588b4068c22412253faf23d57a51a852631c5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKF-`+P3>-s>NHn3N+!sXR2TPO`)I0!4A|b?yLqPiLcs7jf1tmI=s3_1_vS-)l zxxJg>d5{5^~-nG}!$Qa}nw0V(i%1-$ptrYDJtQa}nwfiDI8 z`%vhPwc(H$pALo?0f-Z(!?=!Ff>=C3tPO`mW@wgFVp6S*7?yPAORK95hs31A;$+^Z zoosDFu{fRi66LU(s3--bz@Y-ixt)3cU(tV<{|`ypNdYPFuN1J!@@l!@E4AJ_dO7d4 ug?>Z-G}cBrL$qRIv|?_&6`$?Z6<_muZ8#(bo%x^>^&{ZA$fUquDDVM!9v#R4 diff --git a/electron-react-boilerplate/stylegan2_pytorch/stylegan2/.DS_Store b/electron-react-boilerplate/stylegan2_pytorch/stylegan2/.DS_Store deleted file mode 100644 index c022d9156ffe857af30cbc6893ac1a895a705169..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM%We}f6unLhowPz!0*P*rX2Y(kno<>5P=yeL$_gnJAW@V~lA#$i8Ao{#N(jmV zv0>9KED#%3EZ_&&u;UB(1O9;(oNK%7Odh0c5D$A~U&p@3_C0>gT!)B6u3gCxEfA4| z$Z~!T$%w%99EU>6lrUHTPZUs#ig=c&KBR36ECZGS%YbFTGGH0_6Bxidn}ajvy{~I+ zY8kK${Fe;y`QRe5%o^F(QXL&glnVekjbas$haaFYu8~G!458tu zcUc`WYh+(b4JV=DBuvl3cql^k4xFphNo2LOsb#=2Fw6k^?sLj#4=76b@4FkJESExA zf(CD@D~L05(TaeaLIHJQ(wQ90|I zdpF*F{lp{FHVloXCM&<7U9ZMR@dnM(Nm%s=w;Db*z>h~EY^;%_3Q9t1CatCSK*Twk zfG%~Kbz{rtQaucst>xt}A~iLA?D&k6#&g2CSE$NPq2;yO&79Y`%fD`Vt!l~SH>C^@ z@?Pmy;CG7ir?1MW!qDD=Q5W!wrjhOyH9#gUotB=U(GoTf|B7CeoinuG1;`k3v2=+ zKIzZ5PF**XJ`r^|`A0`376I+Cbrbq|SZG9{jCP>Otju9yNNVCK(tRwNrn(Lr*iPas zG~-KU2FuFFLTg|XmIoJ>+D1RoPBPlNgSH3Si!=D~+1m}n;E>iKW8<}w41GXnl#XwT zk@kKYuy@uV+F;8c%~6UOjaxm7YsCh*eE>umT=6yI0I%wpiXS+R;?x7H(MWyXvPu0m z5CL!QQTl4$;`)HwU>W!u8JN<8USR+K+W7nbztJ>1X3KzO;D`)}>3kudgYy12-5`#A zZ5MGHkpt`XwNwx!tit8W9fv&l!w`Ab)MbtAYl#|!-+mD=;*&l8K6l8z|JB6U