Spaces:
Build error
Build error
Update app.py
Browse files
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=
|
| 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):
|