playmak3r commited on
Commit
40200a0
·
1 Parent(s): 2446ce1

feat: add hugging face spaces.GPU decorator

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,7 +3,7 @@ VibeVoice Gradio Demo - High-Quality Dialogue Generation Interface with Streamin
3
  """
4
 
5
  import argparse, os, tempfile
6
- import torch
7
  import gradio as gr
8
 
9
  from transformers.utils import logging
@@ -229,6 +229,7 @@ Or paste text directly and it will auto-assign speakers.""",
229
  )
230
 
231
  # Main generation function with streaming
 
232
  def generate_podcast_wrapper(num_speakers, script, speaker_1, speaker_2, speaker_3, speaker_4, cfg_scale, disable_voice_cloning):
233
  """Wrapper function to handle the streaming generation call."""
234
  try:
 
3
  """
4
 
5
  import argparse, os, tempfile
6
+ import torch, spaces
7
  import gradio as gr
8
 
9
  from transformers.utils import logging
 
229
  )
230
 
231
  # Main generation function with streaming
232
+ @spaces.GPU
233
  def generate_podcast_wrapper(num_speakers, script, speaker_1, speaker_2, speaker_3, speaker_4, cfg_scale, disable_voice_cloning):
234
  """Wrapper function to handle the streaming generation call."""
235
  try: