2024.07.04 change appropriate app.py
Browse files- .ipynb_checkpoints/app-checkpoint.py +2 -2
- app.py +2 -2
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -8,8 +8,8 @@ import gradio as gr
|
|
8 |
# 모델 로드
|
9 |
processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
|
10 |
model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
|
11 |
-
pipe = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", torch_dtype=torch.
|
12 |
-
pipe = pipe.to("
|
13 |
|
14 |
def detect_objects(image):
|
15 |
# 객체 검출
|
|
|
8 |
# 모델 로드
|
9 |
processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
|
10 |
model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
|
11 |
+
pipe = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", torch_dtype=torch.float32)
|
12 |
+
pipe = pipe.to("cpu")
|
13 |
|
14 |
def detect_objects(image):
|
15 |
# 객체 검출
|
app.py
CHANGED
@@ -8,8 +8,8 @@ import gradio as gr
|
|
8 |
# 모델 로드
|
9 |
processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
|
10 |
model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
|
11 |
-
pipe = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", torch_dtype=torch.
|
12 |
-
pipe = pipe.to("
|
13 |
|
14 |
def detect_objects(image):
|
15 |
# 객체 검출
|
|
|
8 |
# 모델 로드
|
9 |
processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
|
10 |
model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
|
11 |
+
pipe = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", torch_dtype=torch.float32)
|
12 |
+
pipe = pipe.to("cpu")
|
13 |
|
14 |
def detect_objects(image):
|
15 |
# 객체 검출
|