PKUWilliamYang commited on
Commit
8e4df21
1 Parent(s): 387228c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,7 +4,7 @@ from __future__ import annotations
4
 
5
  import argparse
6
  import pathlib
7
-
8
  import gradio as gr
9
 
10
  from vtoonify_model import Model
@@ -79,6 +79,8 @@ example_videos = gr.components.Dataset(components=[sample_vid], samples=[[path]
79
 
80
  def main():
81
  args = parse_args()
 
 
82
  model = Model(device=args.device)
83
 
84
  with gr.Blocks(theme=args.theme, css='style.css') as demo:
 
4
 
5
  import argparse
6
  import pathlib
7
+ import torch
8
  import gradio as gr
9
 
10
  from vtoonify_model import Model
 
79
 
80
  def main():
81
  args = parse_args()
82
+ args.device = 'cuda' if torch.cuda.is_available() else 'cpu'
83
+ print('*** Now using %s.'%(args.device))
84
  model = Model(device=args.device)
85
 
86
  with gr.Blocks(theme=args.theme, css='style.css') as demo: