Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import spaces # 必须放在最前面
|
2 |
import os
|
3 |
import numpy as np
|
4 |
import torch
|
@@ -53,7 +53,7 @@ def resize_image(image, max_size):
|
|
53 |
image = image.resize((new_width, new_height), Image.LANCZOS)
|
54 |
return image
|
55 |
|
56 |
-
|
57 |
def process_image(input_image, resolution_choice):
|
58 |
# 将 Gradio 输入转换为 PIL 图像
|
59 |
input_image = Image.fromarray(input_image)
|
|
|
1 |
+
#import spaces # 必须放在最前面
|
2 |
import os
|
3 |
import numpy as np
|
4 |
import torch
|
|
|
53 |
image = image.resize((new_width, new_height), Image.LANCZOS)
|
54 |
return image
|
55 |
|
56 |
+
#@spaces.GPU
|
57 |
def process_image(input_image, resolution_choice):
|
58 |
# 将 Gradio 输入转换为 PIL 图像
|
59 |
input_image = Image.fromarray(input_image)
|