farbverlauf commited on
Commit
6e8a7f9
·
1 Parent(s): 960b1a0

add spaces.GPU

Browse files
Files changed (2) hide show
  1. app.py +2 -0
  2. requirements.txt +0 -0
app.py CHANGED
@@ -13,6 +13,7 @@ from data_loading.feature_extractor import (
13
  import chardet
14
  import torch
15
  from models.models import BiFormer
 
16
 
17
 
18
  DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
@@ -150,6 +151,7 @@ def get_top_emotion(probabilities):
150
  return f"{LABEL_TO_EMOTION[max_idx]} ({max(probabilities)*100:.1f}%)"
151
 
152
 
 
153
  def process_audio(audio_path):
154
  """Main processing pipeline."""
155
  try:
 
13
  import chardet
14
  import torch
15
  from models.models import BiFormer
16
+ import spaces
17
 
18
 
19
  DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
 
151
  return f"{LABEL_TO_EMOTION[max_idx]} ({max(probabilities)*100:.1f}%)"
152
 
153
 
154
+ @spaces.GPU
155
  def process_audio(audio_path):
156
  """Main processing pipeline."""
157
  try:
requirements.txt CHANGED
Binary files a/requirements.txt and b/requirements.txt differ