mlbench123 commited on
Commit
c5bd926
·
verified ·
1 Parent(s): 108ac1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,13 +26,13 @@ from shapely.geometry import MultiPolygon, GeometryCollection, Polygon, Point
26
  from u2netp import U2NETP
27
  import logging
28
  import shutil
29
-
30
 
31
  # Add this at the very beginning of your main Python file, before any other imports
32
- import os
33
  os.environ['OPENCV_IO_ENABLE_OPENEXR'] = '0'
34
  os.environ['OPENCV_IO_ENABLE_JASPER'] = '0'
35
  os.environ['QT_QPA_PLATFORM'] = 'offscreen'
 
36
 
37
  # For headless environments
38
  import matplotlib
 
26
  from u2netp import U2NETP
27
  import logging
28
  import shutil
29
+ import sys
30
 
31
  # Add this at the very beginning of your main Python file, before any other imports
 
32
  os.environ['OPENCV_IO_ENABLE_OPENEXR'] = '0'
33
  os.environ['OPENCV_IO_ENABLE_JASPER'] = '0'
34
  os.environ['QT_QPA_PLATFORM'] = 'offscreen'
35
+ os.environ['MPLBACKEND'] = 'Agg'
36
 
37
  # For headless environments
38
  import matplotlib