Spaces:
Runtime error
Runtime error
ZhengChong
commited on
Commit
·
8d0429d
1
Parent(s):
6a6227f
Add spaces library for GPU support
Browse files- app.py +2 -2
- requirements.txt +1 -0
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import argparse
|
2 |
import os
|
3 |
from datetime import datetime
|
4 |
-
|
5 |
import gradio as gr
|
6 |
import numpy as np
|
7 |
import torch
|
@@ -126,7 +126,7 @@ automasker = AutoMasker(
|
|
126 |
device='cuda',
|
127 |
)
|
128 |
|
129 |
-
|
130 |
def submit_function(
|
131 |
person_image,
|
132 |
cloth_image,
|
|
|
1 |
import argparse
|
2 |
import os
|
3 |
from datetime import datetime
|
4 |
+
import spaces
|
5 |
import gradio as gr
|
6 |
import numpy as np
|
7 |
import torch
|
|
|
126 |
device='cuda',
|
127 |
)
|
128 |
|
129 |
+
@spaces.GPU
|
130 |
def submit_function(
|
131 |
person_image,
|
132 |
cloth_image,
|
requirements.txt
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
accelerate==0.31.0
|
2 |
diffusers==0.29.2
|
3 |
gradio==4.39.0
|
|
|
4 |
huggingface_hub==0.23.4
|
5 |
matplotlib==3.9.1
|
6 |
numpy==1.26.4
|
|
|
1 |
accelerate==0.31.0
|
2 |
diffusers==0.29.2
|
3 |
gradio==4.39.0
|
4 |
+
spaces==0.29.2
|
5 |
huggingface_hub==0.23.4
|
6 |
matplotlib==3.9.1
|
7 |
numpy==1.26.4
|