abhishekrs4 commited on
Commit
5f54638
1 Parent(s): 4f829c0

code formatting

Browse files
Files changed (1) hide show
  1. frontend.py +22 -6
frontend.py CHANGED
@@ -8,11 +8,14 @@ import streamlit as st
8
  from PIL import Image
9
  from skimage.io import imread
10
 
 
11
  def infer() -> None:
12
  st.title("Overhead MNIST classification app")
13
 
14
  # select an input image file
15
- image_file_buffer = st.sidebar.file_uploader("Select input image", type=["jpg", "jpeg"])
 
 
16
  # read the image
17
  if image_file_buffer is not None:
18
  image = Image.open(image_file_buffer)
@@ -42,31 +45,44 @@ def infer() -> None:
42
  st.write(response.json())
43
  return
44
 
 
45
  def app_info() -> None:
46
  st.title("App info")
47
  st.markdown("_Task - Overhead MNIST classification_")
48
- st.markdown("_Project repo - [https://github.com/AbhishekRS4/overhead_mnist](https://github.com/AbhishekRS4/overhead_mnist)_")
49
- st.markdown("_Dataset - [Overhead MNIST dataset](https://www.kaggle.com/datasets/datamunge/overheadmnist/)_")
 
 
 
 
50
  st.header("Brief description of the project")
51
- st.write("The Overhead MNIST dataset contains images extracted from satellite data.")
52
- st.write("This dataset contains instances for 10 classes --- car, harbor, helicopter, oil_gas_field, parking_lot, plane, runway_mark, ship, stadium, and storage_tank.")
 
 
 
 
53
  st.write("A custom architecture is modeled for the classification task.")
54
  st.write("The best performing model has been used for the deployed application.")
55
  return
56
 
 
57
  app_modes = {
58
- "App Info" : app_info,
59
  "Overhead MNIST Inference App": infer,
60
  }
61
 
 
62
  def start_app() -> None:
63
  selected_mode = st.sidebar.selectbox("Select mode", list(app_modes.keys()))
64
  app_modes[selected_mode]()
65
  return
66
 
 
67
  def main() -> None:
68
  start_app()
69
  return
70
 
 
71
  if __name__ == "__main__":
72
  main()
 
8
  from PIL import Image
9
  from skimage.io import imread
10
 
11
+
12
  def infer() -> None:
13
  st.title("Overhead MNIST classification app")
14
 
15
  # select an input image file
16
+ image_file_buffer = st.sidebar.file_uploader(
17
+ "Select input image", type=["jpg", "jpeg"]
18
+ )
19
  # read the image
20
  if image_file_buffer is not None:
21
  image = Image.open(image_file_buffer)
 
45
  st.write(response.json())
46
  return
47
 
48
+
49
  def app_info() -> None:
50
  st.title("App info")
51
  st.markdown("_Task - Overhead MNIST classification_")
52
+ st.markdown(
53
+ "_Project repo - [https://github.com/AbhishekRS4/overhead_mnist](https://github.com/AbhishekRS4/overhead_mnist)_"
54
+ )
55
+ st.markdown(
56
+ "_Dataset - [Overhead MNIST dataset](https://www.kaggle.com/datasets/datamunge/overheadmnist/)_"
57
+ )
58
  st.header("Brief description of the project")
59
+ st.write(
60
+ "The Overhead MNIST dataset contains images extracted from satellite data."
61
+ )
62
+ st.write(
63
+ "This dataset contains instances for 10 classes --- car, harbor, helicopter, oil_gas_field, parking_lot, plane, runway_mark, ship, stadium, and storage_tank."
64
+ )
65
  st.write("A custom architecture is modeled for the classification task.")
66
  st.write("The best performing model has been used for the deployed application.")
67
  return
68
 
69
+
70
  app_modes = {
71
+ "App Info": app_info,
72
  "Overhead MNIST Inference App": infer,
73
  }
74
 
75
+
76
  def start_app() -> None:
77
  selected_mode = st.sidebar.selectbox("Select mode", list(app_modes.keys()))
78
  app_modes[selected_mode]()
79
  return
80
 
81
+
82
  def main() -> None:
83
  start_app()
84
  return
85
 
86
+
87
  if __name__ == "__main__":
88
  main()