huggingmes-backup / decode.py
louissoume's picture
HuggingMes sync [r-louissoume-hugging-hermes-hd5lyba1-005c9-jfrtk] 2026-05-12T15:25:17Z
6732cea verified
Raw
History Blame Contribute Delete
302 Bytes
import json
import base64
import os
with open('screenshot.png', 'r') as f:
data = json.load(f)
if 'image_base64' in data:
with open('real_screenshot.png', 'wb') as img_file:
img_file.write(base64.b64decode(data['image_base64']))
else:
print("Format inattendu")