tombio commited on
Commit
37aa35d
1 Parent(s): 3ee4cf4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -8
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
- return "Hello " + bouts + " turned into " + person + "!"
 
 
 
 
 
 
 
 
122
 
123
  gradio_interface = gradio.Interface(
124
- fn=my_inference_function,
125
- inputs=["text","text"],
126
- outputs="text",
127
- title="Boutsify images",
128
- description="Turn portraits into a painting in the style of Flemish master Dirck Bouts",
129
- article="© iO Digital"
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()