Skip to content

Commit

Permalink
Add environment yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaloney111 committed May 13, 2024
1 parent 3ec629d commit e2f8057
Show file tree
Hide file tree
Showing 6 changed files with 12,493 additions and 0 deletions.
15 changes: 15 additions & 0 deletions api/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: LinguifAI
channels:
- defaults
dependencies:
- flask=2.3.2
- flask-cors=4.0.0
- pandas=2.0.3
- nltk=3.8.1
- scikit-learn=1.3.0
- numpy=1.25.2
- matplotlib=3.7.1
- seaborn=0.13.0
- tensorflow=2.6.0 # Updated to a version compatible with Conda
- keras=2.6.0 # Updated to a version compatible with Conda
- torchtext=0.17.2
Binary file added api/models/text_classification_pipeline.pkl
Binary file not shown.
43 changes: 43 additions & 0 deletions app.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- mode: python ; coding: utf-8 -*-

a = Analysis(
['api\\app.py'],
pathex=['C:\\Users\\camer\\anaconda3\\envs\\LinguifAI\\Lib\\site-packages', 'C:\\Users\\camer\\AppData\\Roaming\\Python\\Python310\\site-packages\\sklearn'],
binaries=[],
datas=[],
hiddenimports=['sklearn'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='app',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='app',
)
48 changes: 48 additions & 0 deletions helper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const fs = require('fs');
const path = require('path');
const asar = require('asar');

// Path to your app.asar file
const asarFilePath = 'app.asar';

// Function to print out the directory tree and handle errors
function printAsarDirectoryTree(asarPath, currentPath = '') {
try {
// Extracting the asar file
const tempDir = 'temp'; // Temporary directory to extract the contents
asar.extractAll(asarPath, tempDir);

// Constructing the full path to the directory
const directoryPath = path.join(tempDir, currentPath);

// Reading the contents of the directory
const contents = fs.readdirSync(directoryPath);

// Iterating over the contents
contents.forEach(item => {
const itemPath = path.join(directoryPath, item);

try {
// Checking if the item is a directory
if (fs.statSync(itemPath).isDirectory()) {
// Recursively print the directory tree
if (item != "node_modules") {
printAsarDirectoryTree(asarPath, path.join(currentPath, item));
}
} else {
// Print the file path
console.log(path.join(currentPath, item));
}
} catch (error) {
// Handle errors for files not found
console.error(`Error accessing file '${path.join(currentPath, item)}': ${error.message}`);
}
});
} catch (error) {
// Handle errors for directory not found
console.error(`Error accessing directory '${currentPath}': ${error.message}`);
}
}

// Print out the directory tree of the app.asar file
printAsarDirectoryTree(asarFilePath);
Binary file added public/assets/LINDADEMAIS/gisele.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e2f8057

Please sign in to comment.