CoolFace
Apppublic

Aqdas/Encrypted-Invoice-Extractor

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes
app.py13 linesDownload Raw Back to root
1from cryptography.fernet import Fernet2import os 3 4key = os.getenv('ENCRYPTION_KEY').encode('utf-8')5print('This is ENCRYPTION_KEY key', key)6cipher = Fernet(key)7 8files = ['my_extractor.enc', 'pdf_to_image.enc', 'image_to_text.enc', 'run_app.enc']9for file in files:10    with open(file, 'rb') as file:11        encrypted_code = file.read()12    decrypted_code = cipher.decrypt(encrypted_code)13    exec(decrypted_code.decode('utf-8'))