Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -112,20 +112,28 @@ def run(*args):
|
|
112 |
|
113 |
# Clear GPU memory cache so less likely to OOM
|
114 |
torch.cuda.empty_cache()
|
115 |
-
return ims
|
116 |
|
117 |
|
118 |
import gradio
|
119 |
|
120 |
def my_inference_function(bouts, person):
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
gradio_interface = gradio.Interface(
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
)
|
131 |
gradio_interface.launch()
|
|
|
112 |
|
113 |
# Clear GPU memory cache so less likely to OOM
|
114 |
torch.cuda.empty_cache()
|
115 |
+
return ims[0]
|
116 |
|
117 |
|
118 |
import gradio
|
119 |
|
120 |
def my_inference_function(bouts, person):
|
121 |
+
ex = [
|
122 |
+
"Image", "Image", "Text/URL", "Nothing", "Nothing",
|
123 |
+
"","","central symmetric figure detailed artwork","","",
|
124 |
+
"gainsborough.jpeg","blonder.jpeg","blonder.jpeg","blonder.jpeg","blonder.jpeg",
|
125 |
+
1,1.35,1.4,1,1,
|
126 |
+
3.0, 1, 0, 30,
|
127 |
+
]
|
128 |
+
|
129 |
+
return run(ex)
|
130 |
|
131 |
gradio_interface = gradio.Interface(
|
132 |
+
fn=my_inference_function,
|
133 |
+
inputs=["text","text"],
|
134 |
+
outputs="image",
|
135 |
+
title="Boutsify images",
|
136 |
+
description="Turn portraits into a painting in the style of Flemish master Dirck Bouts",
|
137 |
+
article="© iO Digital"
|
138 |
)
|
139 |
gradio_interface.launch()
|