dperales commited on
Commit
5b1444b
1 Parent(s): bf23921

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -199,21 +199,21 @@ def main():
199
  st.image(image, width=150) #,use_column_width=True)
200
  page = option_menu(menu_title='Menu',
201
  menu_icon="robot",
202
- options=["Car Parts Detection",
203
  "Under Construction"],
204
- icons=["chat-dts",
205
  "key"],
206
  default_index=0
207
  )
208
 
209
  # Additional section below the option menu
210
  # st.markdown("---") # Add a separator line
211
- st.header("Settings")
212
 
213
  st.title('ITACA Insurance Core AI Module')
214
 
215
- if page == "Car Parts Detection":
216
- st.header('Car Parts Detection')
217
 
218
  st.write(
219
  """
@@ -232,14 +232,14 @@ def main():
232
  st.write("Please upload an image.")
233
 
234
  if st.button("Prediction"):
235
- # Call the inference function with the uploaded image
236
- imagen1, imagen2, imagen3, partes = inference(image)
237
-
238
- st.image(imagen1, caption="crash image1")
239
- st.image(imagen2, caption="crash image2")
240
- st.image(imagen3, caption="crash image3")
241
- st.write(partes)
242
- print(partes)
243
 
244
  elif page == "Under Construction":
245
  st.header('Under Construction')
 
199
  st.image(image, width=150) #,use_column_width=True)
200
  page = option_menu(menu_title='Menu',
201
  menu_icon="robot",
202
+ options=["Damage Detection",
203
  "Under Construction"],
204
+ icons=["camera",
205
  "key"],
206
  default_index=0
207
  )
208
 
209
  # Additional section below the option menu
210
  # st.markdown("---") # Add a separator line
211
+ # st.header("Settings")
212
 
213
  st.title('ITACA Insurance Core AI Module')
214
 
215
+ if page == "Damage Detection":
216
+ st.header('Car Parts Damage Detection')
217
 
218
  st.write(
219
  """
 
232
  st.write("Please upload an image.")
233
 
234
  if st.button("Prediction"):
235
+ with st.spinner("Loading..."):
236
+ # Call the inference function with the uploaded image
237
+ imagen1, imagen2, imagen3, partes = inference(image)
238
+
239
+ st.image(imagen1, caption="crash image1")
240
+ st.image(imagen2, caption="crash image2")
241
+ st.image(imagen3, caption="crash image3")
242
+ st.table(partes)
243
 
244
  elif page == "Under Construction":
245
  st.header('Under Construction')