Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import matplotlib
|
2 |
matplotlib.use('agg')
|
3 |
import os
|
4 |
-
os.system('Xvfb :1 -screen 0
|
5 |
os.environ['DISPLAY']=':1.0' # tell X clients to use our virtual DISPLAY :1.0
|
6 |
|
7 |
from PIL import Image
|
@@ -60,8 +60,8 @@ if __name__ == "__main__":
|
|
60 |
print(gold_standard_img.info)
|
61 |
print(best_parse_img.info)
|
62 |
|
63 |
-
gold_standard_img.save('gold_standard.png', dpi=(
|
64 |
-
best_parse_img.save('best_parse.png', dpi=(
|
65 |
|
66 |
gold_standard_img_png = Image.open("gold_standard.png")
|
67 |
best_parse_img_png = Image.open("best_parse.png")
|
|
|
1 |
import matplotlib
|
2 |
matplotlib.use('agg')
|
3 |
import os
|
4 |
+
os.system('Xvfb :1 -screen 0 1600x1200x16 &') # create virtual display with size 1600x1200 and 16 bit color. Color can be changed to 24 or 8
|
5 |
os.environ['DISPLAY']=':1.0' # tell X clients to use our virtual DISPLAY :1.0
|
6 |
|
7 |
from PIL import Image
|
|
|
60 |
print(gold_standard_img.info)
|
61 |
print(best_parse_img.info)
|
62 |
|
63 |
+
gold_standard_img.save('gold_standard.png', dpi=(600,600))
|
64 |
+
best_parse_img.save('best_parse.png', dpi=(600,600))
|
65 |
|
66 |
gold_standard_img_png = Image.open("gold_standard.png")
|
67 |
best_parse_img_png = Image.open("best_parse.png")
|