Gnanashri Kota Venkatesh commited on
Commit
853316d
·
unverified ·
1 Parent(s): 3f78a21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -17
app.py CHANGED
@@ -1,16 +1,12 @@
1
  import sys
2
- import subprocess
3
  import warnings
4
 
5
  try:
6
- import numpy as np
7
- if not np.__version__.startswith('1.24'):
8
- warnings.warn(f"Found numpy {np.__version__} - installing compatible version")
9
- subprocess.check_call([sys.executable, "-m", "pip", "install", "numpy==1.24.4", "--force-reinstall"])
10
- import numpy as np
11
- except ImportError:
12
- subprocess.check_call([sys.executable, "-m", "pip", "install", "numpy==1.24.4"])
13
- import numpy as np
14
 
15
  import os
16
  import re
@@ -21,22 +17,17 @@ from pathlib import Path
21
  from collections import defaultdict
22
  from reportlab.lib.pagesizes import A4
23
  from reportlab.platypus import (
24
- SimpleDocTemplate, Table, TableStyle, Image as RLImage, Paragraph, Spacer, PageBreak, KeepInFrame
 
25
  )
26
  from reportlab.lib.styles import getSampleStyleSheet
27
  from reportlab.lib import colors
28
  from PIL import Image as PILImage, ImageOps
29
  import io
30
  import shutil
 
31
  import pandas as pd
32
 
33
- try:
34
- import cv2
35
- CV2_AVAILABLE = True
36
- except ImportError as e:
37
- CV2_AVAILABLE = False
38
- st.warning(f"OpenCV not available: {str(e)} - some features disabled")
39
-
40
 
41
 
42
 
 
1
  import sys
 
2
  import warnings
3
 
4
  try:
5
+ import cv2
6
+ CV2_AVAILABLE = True
7
+ except ImportError as e:
8
+ CV2_AVAILABLE = False
9
+ warnings.warn(f"OpenCV not available: {str(e)} - some features disabled")
 
 
 
10
 
11
  import os
12
  import re
 
17
  from collections import defaultdict
18
  from reportlab.lib.pagesizes import A4
19
  from reportlab.platypus import (
20
+ SimpleDocTemplate, Table, TableStyle, Image as RLImage,
21
+ Paragraph, Spacer, PageBreak, KeepInFrame
22
  )
23
  from reportlab.lib.styles import getSampleStyleSheet
24
  from reportlab.lib import colors
25
  from PIL import Image as PILImage, ImageOps
26
  import io
27
  import shutil
28
+ import numpy as np
29
  import pandas as pd
30
 
 
 
 
 
 
 
 
31
 
32
 
33