Monke64 commited on
Commit
9e17df9
·
1 Parent(s): 7779a0c

Commented out image model code

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
2
  from flask.Emotion_spotting_service import _Emotion_spotting_service
3
  from flask.Genre_spotting_service import _Genre_spotting_service
4
  from flask.Beat_tracking_service import _Beat_tracking_service
5
- from diffusers import StableDiffusionPipeline
6
  import torch
7
 
8
  emo_list = []
@@ -22,11 +22,11 @@ def load_beat_model():
22
  beat_service = _Beat_tracking_service()
23
  return beat_service
24
 
25
- @st.cache_resource
26
- def load_image_model():
27
- pipeline = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5",torch_dtype=torch.float16).to("cuda")
28
- pipeline.load_lora_weights("Weights/pytorch_lora_weights.safetensors", weight_name="pytorch_lora_weights.safetensors")
29
- return pipeline
30
 
31
 
32
  if 'emotion' not in st.session_state:
@@ -41,7 +41,7 @@ if 'beat' not in st.session_state:
41
  emotion_service = load_emo_model()
42
  genre_service = load_genre_model()
43
  beat_service = load_beat_model()
44
- image_service = load_image_model()
45
 
46
  st.title("Music2Image webpage")
47
  user_input = st.file_uploader("Upload your wav/mp3 files here", type=["wav","mp3"],key = "file_uploader")
 
2
  from flask.Emotion_spotting_service import _Emotion_spotting_service
3
  from flask.Genre_spotting_service import _Genre_spotting_service
4
  from flask.Beat_tracking_service import _Beat_tracking_service
5
+ #from diffusers import StableDiffusionPipeline
6
  import torch
7
 
8
  emo_list = []
 
22
  beat_service = _Beat_tracking_service()
23
  return beat_service
24
 
25
+ # @st.cache_resource
26
+ # def load_image_model():
27
+ # pipeline = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5",torch_dtype=torch.float16).to("cuda")
28
+ # pipeline.load_lora_weights("Weights/pytorch_lora_weights.safetensors", weight_name="pytorch_lora_weights.safetensors")
29
+ # return pipeline
30
 
31
 
32
  if 'emotion' not in st.session_state:
 
41
  emotion_service = load_emo_model()
42
  genre_service = load_genre_model()
43
  beat_service = load_beat_model()
44
+ # image_service = load_image_model()
45
 
46
  st.title("Music2Image webpage")
47
  user_input = st.file_uploader("Upload your wav/mp3 files here", type=["wav","mp3"],key = "file_uploader")