tombio commited on
Commit
d906a23
1 Parent(s): defcb0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -20,10 +20,10 @@ ckpt = hf_hub_download(repo_id="lambdalabs/image-mixer", filename="image-mixer-p
20
  config = hf_hub_download(repo_id="lambdalabs/image-mixer", filename="image-mixer-config.yaml", cache_dir="/data/.cache")
21
 
22
  device = "cuda:0"
23
- model = load_model_from_config(config, ckpt, device=device, verbose=False)
24
- model = model.to(device).half()
25
 
26
- clip_model, preprocess = clip.load("ViT-L/14", device=device)
27
 
28
  n_inputs = 5
29
 
@@ -118,7 +118,7 @@ def run(args):
118
 
119
  import gradio
120
 
121
- def my_inference_function(bouts, person):
122
  ex = [
123
  "Image", "Image", "Text/URL", "Nothing", "Nothing",
124
  "","","central symmetric figure detailed artwork","","",
@@ -127,11 +127,11 @@ def my_inference_function(bouts, person):
127
  3.0, 1, 0, 30,
128
  ]
129
 
130
- return run(ex)
131
 
132
  gradio_interface = gradio.Interface(
133
  fn=my_inference_function,
134
- inputs=["text","text"],
135
  outputs="image",
136
  title="Boutsify images",
137
  description="Turn portraits into a painting in the style of Flemish master Dirck Bouts",
 
20
  config = hf_hub_download(repo_id="lambdalabs/image-mixer", filename="image-mixer-config.yaml", cache_dir="/data/.cache")
21
 
22
  device = "cuda:0"
23
+ #model = load_model_from_config(config, ckpt, device=device, verbose=False)
24
+ #model = model.to(device).half()
25
 
26
+ #clip_model, preprocess = clip.load("ViT-L/14", device=device)
27
 
28
  n_inputs = 5
29
 
 
118
 
119
  import gradio
120
 
121
+ def my_inference_function(person):
122
  ex = [
123
  "Image", "Image", "Text/URL", "Nothing", "Nothing",
124
  "","","central symmetric figure detailed artwork","","",
 
127
  3.0, 1, 0, 30,
128
  ]
129
 
130
+ return person
131
 
132
  gradio_interface = gradio.Interface(
133
  fn=my_inference_function,
134
+ inputs="image",
135
  outputs="image",
136
  title="Boutsify images",
137
  description="Turn portraits into a painting in the style of Flemish master Dirck Bouts",