Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import math
|
@@ -24,7 +26,8 @@ def infer(source_img, prompt, steps, seed, strength):
|
|
24 |
steps = math.ceil(1 / max(0.10, strength))
|
25 |
source_image = resize(512, source_img)
|
26 |
source_image.save('source.png')
|
27 |
-
|
|
|
28 |
return result.images[0]
|
29 |
|
30 |
# Gradio interface
|
@@ -39,4 +42,4 @@ gr.Interface(
|
|
39 |
],
|
40 |
outputs='image',
|
41 |
title="Creative Touch"
|
42 |
-
).queue(max_size=10).launch()
|
|
|
1 |
+
import inspect
|
2 |
+
print(inspect.signature(ShapEImg2ImgPipeline.__call__))
|
3 |
import gradio as gr
|
4 |
import torch
|
5 |
import math
|
|
|
26 |
steps = math.ceil(1 / max(0.10, strength))
|
27 |
source_image = resize(512, source_img)
|
28 |
source_image.save('source.png')
|
29 |
+
# Adjust this line based on the correct method signature
|
30 |
+
result = pipe(images=source_image, strength=strength, guidance_scale=7.5, num_inference_steps=steps, generator=generator)
|
31 |
return result.images[0]
|
32 |
|
33 |
# Gradio interface
|
|
|
42 |
],
|
43 |
outputs='image',
|
44 |
title="Creative Touch"
|
45 |
+
).queue(max_size=10).launch()
|