Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
-
import
|
4 |
from paddleocr import PPStructure,draw_structure_result,save_structure_res
|
5 |
|
6 |
# Chinese image
|
@@ -9,7 +9,7 @@ table_engine = PPStructure(show_log=True)
|
|
9 |
examples = ['0.png']
|
10 |
|
11 |
def find_layout(image):
|
12 |
-
img =
|
13 |
result = table_engine(img)
|
14 |
# save_structure_res(result, save_folder,os.path.basename(img_path).split('.')[0])
|
15 |
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
+
import numpy as np
|
4 |
from paddleocr import PPStructure,draw_structure_result,save_structure_res
|
5 |
|
6 |
# Chinese image
|
|
|
9 |
examples = ['0.png']
|
10 |
|
11 |
def find_layout(image):
|
12 |
+
img = np.array(image)
|
13 |
result = table_engine(img)
|
14 |
# save_structure_res(result, save_folder,os.path.basename(img_path).split('.')[0])
|
15 |
|