jitesh commited on
Commit
11b6442
1 Parent(s): bb9eaf2

remove cv2 and adds matplotlib

Browse files
Files changed (2) hide show
  1. requirements.txt +3 -2
  2. src/read_logs.py +6 -4
requirements.txt CHANGED
@@ -8,5 +8,6 @@ nltk==3.7
8
  xlsxwriter==3.0.2
9
  plotly
10
  seaborn
11
- opencv-python>=4.4.0
12
- # streamlit
 
8
  xlsxwriter==3.0.2
9
  plotly
10
  seaborn
11
+ # opencv-python>=4.4.0
12
+ # streamlit
13
+ matplotlib
src/read_logs.py CHANGED
@@ -8,8 +8,8 @@ from os import listdir
8
  from .lib import set_input, create_dowload_button
9
  from os.path import isfile, join, exists
10
  import printj
11
- import cv2
12
-
13
 
14
  class LogAnalyser:
15
  def __init__(self, gen, container_guide, container_param, container_button):
@@ -62,8 +62,10 @@ class LogAnalyser:
62
  self.update_df()
63
  for name in ['c1plot', 'c2plot']:
64
  self.placeholder[name] = st.empty()
65
- image = cv2.imread(f'data/img/{name}.png')
66
- image=cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
 
 
67
  self.placeholder[name].image(image)
68
  if self.debug:
69
  self.get_c1_plot()
8
  from .lib import set_input, create_dowload_button
9
  from os.path import isfile, join, exists
10
  import printj
11
+ # import cv2
12
+ import matplotlib.image as mpimg
13
 
14
  class LogAnalyser:
15
  def __init__(self, gen, container_guide, container_param, container_button):
62
  self.update_df()
63
  for name in ['c1plot', 'c2plot']:
64
  self.placeholder[name] = st.empty()
65
+ # image = cv2.imread(f'data/img/{name}.png')
66
+ # image=cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
67
+
68
+ image = mpimg.imread(f'data/img/{name}.png')
69
  self.placeholder[name].image(image)
70
  if self.debug:
71
  self.get_c1_plot()