Update app.py
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ def pref_inpainting(image,
|
|
| 28 |
config = munchify(config_dict)
|
| 29 |
|
| 30 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 31 |
-
|
| 32 |
|
| 33 |
pipe_ours = AutoPipelineForInpainting.from_pretrained(
|
| 34 |
'./model_ckpt', torch_dtype=torch.float16, variant='fp16')
|
|
@@ -87,8 +87,6 @@ examples = [
|
|
| 87 |
|
| 88 |
|
| 89 |
with gr.Blocks() as demo:
|
| 90 |
-
|
| 91 |
-
|
| 92 |
iface = gr.Interface(
|
| 93 |
fn=pref_inpainting,
|
| 94 |
inputs=inputs,
|
|
@@ -99,8 +97,6 @@ with gr.Blocks() as demo:
|
|
| 99 |
examples=examples,
|
| 100 |
# allow_flagging="never"
|
| 101 |
)
|
| 102 |
-
|
| 103 |
-
|
| 104 |
# iface.launch()
|
| 105 |
-
|
| 106 |
demo.launch()
|
|
|
|
| 28 |
config = munchify(config_dict)
|
| 29 |
|
| 30 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 31 |
+
print(f"Current Device is {device}")
|
| 32 |
|
| 33 |
pipe_ours = AutoPipelineForInpainting.from_pretrained(
|
| 34 |
'./model_ckpt', torch_dtype=torch.float16, variant='fp16')
|
|
|
|
| 87 |
|
| 88 |
|
| 89 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
| 90 |
iface = gr.Interface(
|
| 91 |
fn=pref_inpainting,
|
| 92 |
inputs=inputs,
|
|
|
|
| 97 |
examples=examples,
|
| 98 |
# allow_flagging="never"
|
| 99 |
)
|
|
|
|
|
|
|
| 100 |
# iface.launch()
|
| 101 |
+
|
| 102 |
demo.launch()
|