Spaces:
Runtime error
Runtime error
Add spaces GPU decorator to use zeroGPU resources
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from dataclasses import dataclass, field
|
| 2 |
import logging
|
|
|
|
| 3 |
|
| 4 |
import sys
|
| 5 |
sys.path.append("/home/user/app/src/sonicverse")
|
|
@@ -50,6 +51,7 @@ model, tokenizer = load_trained_lora_model(
|
|
| 50 |
tasks_config=serve_args.tasks_config
|
| 51 |
)
|
| 52 |
|
|
|
|
| 53 |
def caption_audio(audio_file):
|
| 54 |
chunk_audio_files = split_audio(audio_file, CHUNK_LENGTH)
|
| 55 |
chunk_captions = []
|
|
|
|
| 1 |
from dataclasses import dataclass, field
|
| 2 |
import logging
|
| 3 |
+
import spaces
|
| 4 |
|
| 5 |
import sys
|
| 6 |
sys.path.append("/home/user/app/src/sonicverse")
|
|
|
|
| 51 |
tasks_config=serve_args.tasks_config
|
| 52 |
)
|
| 53 |
|
| 54 |
+
@spaces.GPU(duration=300)
|
| 55 |
def caption_audio(audio_file):
|
| 56 |
chunk_audio_files = split_audio(audio_file, CHUNK_LENGTH)
|
| 57 |
chunk_captions = []
|