PengWeixuanSZU commited on
Commit
32f59ee
·
verified ·
1 Parent(s): 4b5949a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -17
app.py CHANGED
@@ -177,7 +177,7 @@ def inference(source_images,
177
 
178
  return video
179
 
180
- @spaces.GPU(duration=240)
181
  def process_video(video_file, image_file, positive_prompt, negative_prompt, guidance, random_seed, choice, progress=gr.Progress(track_tqdm=True))->str:
182
  if choice==33:
183
  video_shard=1
@@ -284,19 +284,3 @@ with gr.Blocks() as demo:
284
  )
285
 
286
  demo.queue().launch()
287
- """
288
- import gradio as gr
289
- import spaces
290
- import torch
291
-
292
- zero = torch.Tensor([0]).cuda()
293
- print(zero.device) # <-- 'cpu' 🤔
294
-
295
- @spaces.GPU
296
- def greet(n):
297
- print(zero.device) # <-- 'cuda:0' 🤗
298
- return f"Hello {zero + n} Tensor"
299
-
300
- demo = gr.Interface(fn=greet, inputs=gr.Number(), outputs=gr.Text())
301
- demo.launch()
302
- """
 
177
 
178
  return video
179
 
180
+ @spaces.GPU(duration=300)
181
  def process_video(video_file, image_file, positive_prompt, negative_prompt, guidance, random_seed, choice, progress=gr.Progress(track_tqdm=True))->str:
182
  if choice==33:
183
  video_shard=1
 
284
  )
285
 
286
  demo.queue().launch()