geekyrakshit commited on
Commit
aa1deb6
1 Parent(s): ea5fe83

updated app

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,11 +1,10 @@
1
  from PIL import Image
2
  import streamlit as st
3
- from tensorflow.keras import utils
4
 
5
  from enhance_me.mirnet import MIRNet
6
 
7
 
8
- @st.cache(allow_output_mutation=True)
9
  def get_mirnet_object() -> MIRNet:
10
  mirnet = MIRNet()
11
  mirnet.build_model()
@@ -34,6 +33,7 @@ def main():
34
  mirnet = get_mirnet_object()
35
  enhanced_image = mirnet.infer(original_image)
36
  st.image(enhanced_image, caption="enhanced image")
 
37
 
38
 
39
  if __name__ == "__main__":
 
1
  from PIL import Image
2
  import streamlit as st
3
+ from tensorflow.keras import utils, backend
4
 
5
  from enhance_me.mirnet import MIRNet
6
 
7
 
 
8
  def get_mirnet_object() -> MIRNet:
9
  mirnet = MIRNet()
10
  mirnet.build_model()
 
33
  mirnet = get_mirnet_object()
34
  enhanced_image = mirnet.infer(original_image)
35
  st.image(enhanced_image, caption="enhanced image")
36
+ backend.clear_session()
37
 
38
 
39
  if __name__ == "__main__":