Spaces:
Running
on
T4
Running
on
T4
yuntian-deng
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
4 |
import requests
|
@@ -28,6 +28,7 @@ notice = "<p><center>Acknowledgment: This demo is powered by GPU resources suppo
|
|
28 |
|
29 |
|
30 |
# setup
|
|
|
31 |
def setup(device='cuda'):
|
32 |
device = ("cuda" if torch.cuda.is_available() else "cpu")
|
33 |
img_pipe = DDPMPipeline.from_pretrained("yuntian-deng/latex2im_ss_finetunegptneo")
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
4 |
import requests
|
|
|
28 |
|
29 |
|
30 |
# setup
|
31 |
+
@spaces.GPU
|
32 |
def setup(device='cuda'):
|
33 |
device = ("cuda" if torch.cuda.is_available() else "cpu")
|
34 |
img_pipe = DDPMPipeline.from_pretrained("yuntian-deng/latex2im_ss_finetunegptneo")
|