nimatov commited on
Commit
695d4f7
·
verified ·
1 Parent(s): bc81ae4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -48,7 +48,20 @@ def load_image_model():
48
  pipeline.load_lora_weights("Weights/pytorch_lora_weights.safetensors", weight_name="pytorch_lora_weights.safetensors")
49
  return pipeline
50
 
 
 
51
 
 
 
 
 
 
 
 
 
 
 
52
  print_memory_info()
53
  image_service = load_image_model()
 
54
  print_memory_info()
 
48
  pipeline.load_lora_weights("Weights/pytorch_lora_weights.safetensors", weight_name="pytorch_lora_weights.safetensors")
49
  return pipeline
50
 
51
+ if 'emotion' not in st.session_state:
52
+ st.session_state.emotion = None
53
 
54
+ if 'genre' not in st.session_state:
55
+ st.session_state.genre = None
56
+
57
+ if 'beat' not in st.session_state:
58
+ st.session_state.beat = None
59
+
60
+ logger.info(f"Measuring memory before load_emo_model")
61
+ print_memory_info()
62
+ emotion_service = load_emo_model()
63
+ logger.info(f"Measuring memory before load_image_model")
64
  print_memory_info()
65
  image_service = load_image_model()
66
+ logger.info(f"Measuring memory after load_image_model")
67
  print_memory_info()