Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import pandas as pd
|
|
|
2 |
import PIL
|
3 |
from PIL import Image
|
4 |
from PIL import ImageDraw
|
@@ -22,6 +23,9 @@ def inference(img, lang):
|
|
22 |
draw_boxes(im, bounds)
|
23 |
im.save('result.jpg')
|
24 |
|
|
|
|
|
|
|
25 |
#result_buffer = io.BytesIO()
|
26 |
|
27 |
return ['result.jpg', pd.DataFrame(bounds).iloc[: , 1:]]
|
|
|
1 |
import pandas as pd
|
2 |
+
import numpy as np
|
3 |
import PIL
|
4 |
from PIL import Image
|
5 |
from PIL import ImageDraw
|
|
|
23 |
draw_boxes(im, bounds)
|
24 |
im.save('result.jpg')
|
25 |
|
26 |
+
np_arr = np.array(im)
|
27 |
+
gr.Textbox(np_arr.shape)
|
28 |
+
|
29 |
#result_buffer = io.BytesIO()
|
30 |
|
31 |
return ['result.jpg', pd.DataFrame(bounds).iloc[: , 1:]]
|