Update main.py
Browse files
    	
        main.py
    CHANGED
    
    | 
         @@ -1,7 +1,5 @@ 
     | 
|
| 1 | 
         
             
            import gradio as gr
         
     | 
| 2 | 
         
             
            import torch
         
     | 
| 3 | 
         
            -
            import gc # free up memory
         
     | 
| 4 | 
         
            -
            import spaces
         
     | 
| 5 | 
         
             
            import gc
         
     | 
| 6 | 
         
             
            import os
         
     | 
| 7 | 
         
             
            import random
         
     | 
| 
         @@ -365,7 +363,7 @@ class AudioUpscaler: 
     | 
|
| 365 | 
         
             
                    return waveform
         
     | 
| 366 | 
         
             
                    # return output_file
         
     | 
| 367 | 
         | 
| 368 | 
         
            -
             
     | 
| 369 | 
         
             
            def inference(audio_file, model_name, guidance_scale, ddim_steps, seed):
         
     | 
| 370 | 
         
             
                audiosr = build_model(model_name=model_name)
         
     | 
| 371 | 
         | 
| 
         | 
|
| 1 | 
         
             
            import gradio as gr
         
     | 
| 2 | 
         
             
            import torch
         
     | 
| 
         | 
|
| 
         | 
|
| 3 | 
         
             
            import gc
         
     | 
| 4 | 
         
             
            import os
         
     | 
| 5 | 
         
             
            import random
         
     | 
| 
         | 
|
| 363 | 
         
             
                    return waveform
         
     | 
| 364 | 
         
             
                    # return output_file
         
     | 
| 365 | 
         | 
| 366 | 
         
            +
            @spaces.GPU
         
     | 
| 367 | 
         
             
            def inference(audio_file, model_name, guidance_scale, ddim_steps, seed):
         
     | 
| 368 | 
         
             
                audiosr = build_model(model_name=model_name)
         
     | 
| 369 | 
         |