Jensen-holm commited on
Commit
f308820
1 Parent(s): e571d8c

switching back to bas64 encoding/decoding with image byte data

Browse files
Files changed (1) hide show
  1. neural_network/neural_network.py +1 -2
neural_network/neural_network.py CHANGED
@@ -5,7 +5,6 @@ import seaborn as sns
5
  from typing import Callable
6
  import numpy as np
7
  import base64
8
- import binascii
9
  import io
10
 
11
  sns.set()
@@ -59,7 +58,7 @@ class NeuralNetwork:
59
  plt.savefig(buffer, format='png')
60
  buffer.seek(0)
61
  plt_data = buffer.read()
62
- plt_data_encoded = binascii.hexlify(plt_data).decode('utf-8')
63
  self.set_plot_data(plt_data_encoded)
64
  plt.close()
65
 
 
5
  from typing import Callable
6
  import numpy as np
7
  import base64
 
8
  import io
9
 
10
  sns.set()
 
58
  plt.savefig(buffer, format='png')
59
  buffer.seek(0)
60
  plt_data = buffer.read()
61
+ plt_data_encoded = base64.b64encode(plt_data).decode('utf-8')
62
  self.set_plot_data(plt_data_encoded)
63
  plt.close()
64