Commit
•
c95f8ee
1
Parent(s):
5c063a6
code formatting
Browse files- frontend.py +13 -3
frontend.py
CHANGED
@@ -8,6 +8,7 @@ import streamlit as st
|
|
8 |
from PIL import Image
|
9 |
from skimage.io import imread
|
10 |
|
|
|
11 |
def infer() -> None:
|
12 |
st.title("IAM Handwriting recognition app")
|
13 |
|
@@ -41,30 +42,39 @@ def infer() -> None:
|
|
41 |
st.write(response.json())
|
42 |
return
|
43 |
|
|
|
44 |
def app_info() -> None:
|
45 |
st.title("App info")
|
46 |
st.markdown("_Task - IAM Handwriting recognition_")
|
47 |
-
st.markdown(
|
48 |
-
|
|
|
|
|
|
|
|
|
49 |
st.header("Brief description of the project")
|
50 |
st.write("The IAM dataset contains images of handwritten text in English language.")
|
51 |
st.write("A custom architecture is modeled for the recognition task.")
|
52 |
st.write("The best performing model has been used for the deployed application.")
|
53 |
return
|
54 |
|
|
|
55 |
app_modes = {
|
56 |
-
"App Info"
|
57 |
"IAM Handwriting Recognition Inference App": infer,
|
58 |
}
|
59 |
|
|
|
60 |
def start_app() -> None:
|
61 |
selected_mode = st.sidebar.selectbox("Select mode", list(app_modes.keys()))
|
62 |
app_modes[selected_mode]()
|
63 |
return
|
64 |
|
|
|
65 |
def main() -> None:
|
66 |
start_app()
|
67 |
return
|
68 |
|
|
|
69 |
if __name__ == "__main__":
|
70 |
main()
|
|
|
8 |
from PIL import Image
|
9 |
from skimage.io import imread
|
10 |
|
11 |
+
|
12 |
def infer() -> None:
|
13 |
st.title("IAM Handwriting recognition app")
|
14 |
|
|
|
42 |
st.write(response.json())
|
43 |
return
|
44 |
|
45 |
+
|
46 |
def app_info() -> None:
|
47 |
st.title("App info")
|
48 |
st.markdown("_Task - IAM Handwriting recognition_")
|
49 |
+
st.markdown(
|
50 |
+
"_Project repo - [https://github.com/AbhishekRS4/Handwriting_Recognition](https://github.com/AbhishekRS4/Handwriting_Recognition)_"
|
51 |
+
)
|
52 |
+
st.markdown(
|
53 |
+
"_Dataset - [IAM dataset](https://fki.tic.heia-fr.ch/databases/iam-handwriting-database)_"
|
54 |
+
)
|
55 |
st.header("Brief description of the project")
|
56 |
st.write("The IAM dataset contains images of handwritten text in English language.")
|
57 |
st.write("A custom architecture is modeled for the recognition task.")
|
58 |
st.write("The best performing model has been used for the deployed application.")
|
59 |
return
|
60 |
|
61 |
+
|
62 |
app_modes = {
|
63 |
+
"App Info": app_info,
|
64 |
"IAM Handwriting Recognition Inference App": infer,
|
65 |
}
|
66 |
|
67 |
+
|
68 |
def start_app() -> None:
|
69 |
selected_mode = st.sidebar.selectbox("Select mode", list(app_modes.keys()))
|
70 |
app_modes[selected_mode]()
|
71 |
return
|
72 |
|
73 |
+
|
74 |
def main() -> None:
|
75 |
start_app()
|
76 |
return
|
77 |
|
78 |
+
|
79 |
if __name__ == "__main__":
|
80 |
main()
|