gokaygokay commited on
Commit
5233262
·
verified ·
1 Parent(s): e8e4ed5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,9 +3,11 @@ import gradio as gr
3
  from PIL import Image
4
  from transparent_background import Remover
5
  import numpy as np
 
6
 
 
7
  # Initialize the model globally
8
- remover = Remover(jit=False)
9
 
10
  @spaces.GPU
11
  def process_image(input_image, output_type):
 
3
  from PIL import Image
4
  from transparent_background import Remover
5
  import numpy as np
6
+ import torch
7
 
8
+ torch.jit.script = lambda f: f
9
  # Initialize the model globally
10
+ remover = Remover(jit=True)
11
 
12
  @spaces.GPU
13
  def process_image(input_image, output_type):