Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
# -*- encoding: utf-8 -*-
|
2 |
# @Author: SWHL
|
3 |
# @Contact: liekkaskono@163.com
|
4 |
-
|
5 |
-
|
6 |
import streamlit as st
|
|
|
7 |
|
8 |
|
9 |
if __name__ == '__main__':
|
@@ -18,15 +18,18 @@ if __name__ == '__main__':
|
|
18 |
</p>
|
19 |
""", unsafe_allow_html=True)
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
1 |
# -*- encoding: utf-8 -*-
|
2 |
# @Author: SWHL
|
3 |
# @Contact: liekkaskono@163.com
|
4 |
+
import numpy as np
|
|
|
5 |
import streamlit as st
|
6 |
+
from PIL import Image
|
7 |
|
8 |
|
9 |
if __name__ == '__main__':
|
|
|
18 |
</p>
|
19 |
""", unsafe_allow_html=True)
|
20 |
|
21 |
+
img_suffix = ["png", "jpg", "jpeg"]
|
22 |
+
|
23 |
+
st.markdown('##### rapid-orientation (文档图像分类) demo')
|
24 |
+
img_empty = st.empty()
|
25 |
+
img_file_buffer = st.file_uploader("Upload an image",
|
26 |
+
type=img_suffix,
|
27 |
+
label_visibility='hidden')
|
28 |
+
if img_file_buffer:
|
29 |
+
image = Image.open(img_file_buffer)
|
30 |
+
img_array = np.array(image)
|
31 |
+
if image:
|
32 |
+
img_empty.image(image, use_column_width=True)
|
33 |
+
|
34 |
+
st.markdown('##### rapid-layout (版面分析) demo')
|
35 |
+
st.markdown('##### rapid-table (表格还原) demo')
|