Fabrice-TIERCELIN commited on
Commit
1cfeb84
·
verified ·
1 Parent(s): 0d506b5

Ease the run on local

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -4,7 +4,15 @@ import time
4
  import math
5
  import random
6
  import torch
7
- import spaces
 
 
 
 
 
 
 
 
8
 
9
  from diffusers import AutoPipelineForImage2Image
10
  from PIL import Image, ImageFilter
 
4
  import math
5
  import random
6
  import torch
7
+
8
+ try:
9
+ import spaces
10
+ except:
11
+ class spaces():
12
+ def GPU(*args, **kwargs):
13
+ def decorator(function):
14
+ return lambda *dummy_args, **dummy_kwargs: function(*dummy_args, **dummy_kwargs)
15
+ return decorator
16
 
17
  from diffusers import AutoPipelineForImage2Image
18
  from PIL import Image, ImageFilter