zamborg commited on
Commit
41b10db
1 Parent(s): 712349e

add debug printing for time

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import streamlit as st
2
  import io
3
  import sys
 
4
  sys.path.append("./virtex/")
5
 
6
  st.title("Image Captioning Demo from Redcaps")
@@ -11,11 +12,18 @@ st.sidebar.markdown(
11
  )
12
 
13
  with st.spinner("Loading Model"):
 
 
14
  from model import *
 
15
  sample_images = glob.glob("./samples/*.jpg")
 
16
  download_files()
 
 
17
  virtexModel = VirTexModel()
18
  imageLoader = ImageLoader()
 
19
 
20
  random_image = get_rand_img(sample_images)
21
 
 
1
  import streamlit as st
2
  import io
3
  import sys
4
+ import time
5
  sys.path.append("./virtex/")
6
 
7
  st.title("Image Captioning Demo from Redcaps")
 
12
  )
13
 
14
  with st.spinner("Loading Model"):
15
+ st.write("DEBUG PRINTING ==========")
16
+ start = time.time()
17
  from model import *
18
+ st.write(f"Import TIME: {time.time()-start}")
19
  sample_images = glob.glob("./samples/*.jpg")
20
+ start = time.time()
21
  download_files()
22
+ st.write(f"download TIME: {time.time()-start}")
23
+ start = time.time
24
  virtexModel = VirTexModel()
25
  imageLoader = ImageLoader()
26
+ st.write(f"model TIME: {time.time()-start}")
27
 
28
  random_image = get_rand_img(sample_images)
29