m7mdal7aj commited on
Commit
a55a660
1 Parent(s): 5f4a46b

Update my_model/utilities.py

Browse files
Files changed (1) hide show
  1. my_model/utilities.py +3 -2
my_model/utilities.py CHANGED
@@ -9,6 +9,7 @@ import matplotlib.pyplot as plt
9
  from IPython import get_ipython
10
  import sys
11
  import gc
 
12
 
13
 
14
  class VQADataProcessor:
@@ -302,9 +303,9 @@ def free_gpu_resources():
302
  torch.cuda.empty_cache()
303
  gc.collect()
304
 
305
- print("GPU memory has been cleared.")
306
  except Exception as e:
307
- print(f"Error occurred while clearing GPU memory: {str(e)}")
308
 
309
 
310
 
 
9
  from IPython import get_ipython
10
  import sys
11
  import gc
12
+ import streamlit as st
13
 
14
 
15
  class VQADataProcessor:
 
303
  torch.cuda.empty_cache()
304
  gc.collect()
305
 
306
+ st.write("GPU memory has been cleared.")
307
  except Exception as e:
308
+ st.write(f"Error occurred while clearing GPU memory")
309
 
310
 
311