Spaces:
				
			
			
	
			
			
		Running
		
			on 
			
			L40S
	
	
	
			
			
	
	
	
	
		
		
		Running
		
			on 
			
			L40S
	
		root
		
	commited on
		
		
					Commit 
							
							·
						
						1be5a09
	
1
								Parent(s):
							
							af26727
								
change ckpt name & UI
Browse files- app.py +6 -5
- download.py +1 -1
    	
        app.py
    CHANGED
    
    | @@ -14,7 +14,7 @@ print("Successful downloaded model.") | |
| 14 | 
             
            from levo_inference import LeVoInference
         | 
| 15 |  | 
| 16 | 
             
            # 模型初始化
         | 
| 17 | 
            -
            MODEL = LeVoInference(op.join(APP_DIR, "ckpt/ | 
| 18 |  | 
| 19 | 
             
            EXAMPLE_LYRICS = """
         | 
| 20 | 
             
            [intro-short]
         | 
| @@ -154,11 +154,11 @@ lyrics | |
| 154 | 
             
                        with gr.Tabs(elem_id="extra-tabs"):
         | 
| 155 | 
             
                            with gr.Tab("Genre Select"):
         | 
| 156 | 
             
                                genre = gr.Radio(
         | 
| 157 | 
            -
                                    choices=[" | 
| 158 | 
             
                                    label="Genre Select(Optional)",
         | 
| 159 | 
            -
                                    value=" | 
| 160 | 
             
                                    interactive=True,
         | 
| 161 | 
            -
                                    elem_id="single-select-radio" | 
| 162 | 
             
                                )
         | 
| 163 | 
             
                            with gr.Tab("Audio Prompt"):
         | 
| 164 | 
             
                                prompt_audio = gr.Audio(
         | 
| @@ -167,9 +167,10 @@ lyrics | |
| 167 | 
             
                                    elem_id="audio-prompt"
         | 
| 168 | 
             
                                )
         | 
| 169 | 
             
                            with gr.Tab("Text Prompt"):
         | 
|  | |
| 170 | 
             
                                description = gr.Textbox(
         | 
| 171 | 
             
                                    label="Song Description (Optional)",
         | 
| 172 | 
            -
                                    info="Describe the gender, timbre, genre, emotion, instrument and bpm of the song",
         | 
| 173 | 
             
                                    placeholder="female, dark, pop, sad, piano and drums, the bpm is 125.",
         | 
| 174 | 
             
                                    lines=1,
         | 
| 175 | 
             
                                    max_lines=2
         | 
|  | |
| 14 | 
             
            from levo_inference import LeVoInference
         | 
| 15 |  | 
| 16 | 
             
            # 模型初始化
         | 
| 17 | 
            +
            MODEL = LeVoInference(op.join(APP_DIR, "ckpt/songgeneration_base/"))
         | 
| 18 |  | 
| 19 | 
             
            EXAMPLE_LYRICS = """
         | 
| 20 | 
             
            [intro-short]
         | 
|  | |
| 154 | 
             
                        with gr.Tabs(elem_id="extra-tabs"):
         | 
| 155 | 
             
                            with gr.Tab("Genre Select"):
         | 
| 156 | 
             
                                genre = gr.Radio(
         | 
| 157 | 
            +
                                    choices=["Pop", "R&B", "Dance", "Jazz", "Folk", "Rock", "Chinese Style", "Chinese Tradition", "Metal", "Reggae", "Chinese Opera", "Auto"],
         | 
| 158 | 
             
                                    label="Genre Select(Optional)",
         | 
| 159 | 
            +
                                    value="Pop",
         | 
| 160 | 
             
                                    interactive=True,
         | 
| 161 | 
            +
                                    elem_id="single-select-radio"
         | 
| 162 | 
             
                                )
         | 
| 163 | 
             
                            with gr.Tab("Audio Prompt"):
         | 
| 164 | 
             
                                prompt_audio = gr.Audio(
         | 
|  | |
| 167 | 
             
                                    elem_id="audio-prompt"
         | 
| 168 | 
             
                                )
         | 
| 169 | 
             
                            with gr.Tab("Text Prompt"):
         | 
| 170 | 
            +
                                gr.Markdown("For detailed usage, please refer to [here](https://github.com/tencent-ailab/SongGeneration?tab=readme-ov-file#-description-input-format)")
         | 
| 171 | 
             
                                description = gr.Textbox(
         | 
| 172 | 
             
                                    label="Song Description (Optional)",
         | 
| 173 | 
            +
                                    info="Describe the gender, timbre, genre, emotion, instrument and bpm of the song. Only English is supported currently.",
         | 
| 174 | 
             
                                    placeholder="female, dark, pop, sad, piano and drums, the bpm is 125.",
         | 
| 175 | 
             
                                    lines=1,
         | 
| 176 | 
             
                                    max_lines=2
         | 
    	
        download.py
    CHANGED
    
    | @@ -7,7 +7,7 @@ def download_model(local_dir): | |
| 7 | 
             
                downloaded_path = snapshot_download(
         | 
| 8 | 
             
                    repo_id=repo_id,
         | 
| 9 | 
             
                    local_dir=local_dir,
         | 
| 10 | 
            -
                    revision=" | 
| 11 | 
             
                    token=os.environ.get("HF_TOKEN"), 
         | 
| 12 | 
             
                    ignore_patterns=['.git*']
         | 
| 13 | 
             
                )
         | 
|  | |
| 7 | 
             
                downloaded_path = snapshot_download(
         | 
| 8 | 
             
                    repo_id=repo_id,
         | 
| 9 | 
             
                    local_dir=local_dir,
         | 
| 10 | 
            +
                    revision="0c80d30",
         | 
| 11 | 
             
                    token=os.environ.get("HF_TOKEN"), 
         | 
| 12 | 
             
                    ignore_patterns=['.git*']
         | 
| 13 | 
             
                )
         | 
