Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -72,8 +72,8 @@ device = "cuda:0" 
     | 
|
| 72 | 
         
             
            # Load model and tokenizer outside the generation function (load once)
         
     | 
| 73 | 
         
             
            print("Loading model...")
         
     | 
| 74 | 
         
             
            model = AutoModelForCausalLM.from_pretrained(
         
     | 
| 75 | 
         
            -
                "m-a-p/YuE-s1-7B-anneal-en- 
     | 
| 76 | 
         
            -
                torch_dtype=torch. 
     | 
| 77 | 
         
             
                attn_implementation="flash_attention_2",
         
     | 
| 78 | 
         
             
            ).to(device)
         
     | 
| 79 | 
         
             
            model.eval()
         
     | 
| 
         @@ -358,7 +358,7 @@ with gr.Blocks() as demo: 
     | 
|
| 358 | 
         
             
                    gr.Examples(
         
     | 
| 359 | 
         
             
                        examples=[
         
     | 
| 360 | 
         
             
                            [
         
     | 
| 361 | 
         
            -
                                "rap piano street tough piercing vocal hip-hop synthesizer clear  
     | 
| 362 | 
         
             
                                """[verse]
         
     | 
| 363 | 
         
             
            Woke up in the morning, sun is shining bright
         
     | 
| 364 | 
         
             
            Chasing all my dreams, gotta get my mind right
         
     | 
| 
         | 
|
| 72 | 
         
             
            # Load model and tokenizer outside the generation function (load once)
         
     | 
| 73 | 
         
             
            print("Loading model...")
         
     | 
| 74 | 
         
             
            model = AutoModelForCausalLM.from_pretrained(
         
     | 
| 75 | 
         
            +
                "m-a-p/YuE-s1-7B-anneal-en-cot", # "m-a-p/YuE-s1-7B-anneal-en-icl",
         
     | 
| 76 | 
         
            +
                torch_dtype=torch.bfloat16,
         
     | 
| 77 | 
         
             
                attn_implementation="flash_attention_2",
         
     | 
| 78 | 
         
             
            ).to(device)
         
     | 
| 79 | 
         
             
            model.eval()
         
     | 
| 
         | 
|
| 358 | 
         
             
                    gr.Examples(
         
     | 
| 359 | 
         
             
                        examples=[
         
     | 
| 360 | 
         
             
                            [
         
     | 
| 361 | 
         
            +
                                "rap piano street tough piercing vocal hip-hop synthesizer clear vocal male",
         
     | 
| 362 | 
         
             
                                """[verse]
         
     | 
| 363 | 
         
             
            Woke up in the morning, sun is shining bright
         
     | 
| 364 | 
         
             
            Chasing all my dreams, gotta get my mind right
         
     |