Spaces:
Sleeping
Sleeping
deepsh2207
commited on
Commit
·
383e64a
1
Parent(s):
4f97e5d
minor updates
Browse files- app.py +4 -8
- backend/pytorch.py +0 -5
app.py
CHANGED
@@ -1,8 +1,3 @@
|
|
1 |
-
# Copyright (C) 2021-2024, Mindee.
|
2 |
-
|
3 |
-
# This program is licensed under the Apache License 2.0.
|
4 |
-
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
|
5 |
-
|
6 |
import cv2
|
7 |
import matplotlib.pyplot as plt
|
8 |
import numpy as np
|
@@ -23,15 +18,16 @@ def main(det_archs, reco_archs):
|
|
23 |
st.set_page_config(layout="wide")
|
24 |
|
25 |
# Designing the interface
|
26 |
-
st.title("
|
27 |
# For newline
|
28 |
st.write("\n")
|
29 |
# Instructions
|
30 |
st.markdown("*Hint: click on the top-right corner of an image to enlarge it!*")
|
31 |
# Set the columns
|
32 |
-
cols = st.columns((1, 1, 1, 1))
|
|
|
33 |
cols[0].subheader("Input page")
|
34 |
-
cols[1].subheader("Segmentation heatmap")
|
35 |
cols[2].subheader("OCR output")
|
36 |
cols[3].subheader("Page reconstitution")
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import cv2
|
2 |
import matplotlib.pyplot as plt
|
3 |
import numpy as np
|
|
|
18 |
st.set_page_config(layout="wide")
|
19 |
|
20 |
# Designing the interface
|
21 |
+
st.title("Document Text Extraction")
|
22 |
# For newline
|
23 |
st.write("\n")
|
24 |
# Instructions
|
25 |
st.markdown("*Hint: click on the top-right corner of an image to enlarge it!*")
|
26 |
# Set the columns
|
27 |
+
# cols = st.columns((1, 1, 1, 1))
|
28 |
+
cols = st.columns((1, 1, 1))
|
29 |
cols[0].subheader("Input page")
|
30 |
+
# cols[1].subheader("Segmentation heatmap")
|
31 |
cols[2].subheader("OCR output")
|
32 |
cols[3].subheader("Page reconstitution")
|
33 |
|
backend/pytorch.py
CHANGED
@@ -1,8 +1,3 @@
|
|
1 |
-
# Copyright (C) 2021-2024, Mindee.
|
2 |
-
|
3 |
-
# This program is licensed under the Apache License 2.0.
|
4 |
-
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
|
5 |
-
|
6 |
import numpy as np
|
7 |
import torch
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import numpy as np
|
2 |
import torch
|
3 |
|