fffiloni commited on
Commit
f90f58c
1 Parent(s): d646bce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -17,23 +17,23 @@ def infer(prompt,image):
17
  print(result)
18
  print(result[0])
19
  print(result[0][0])
20
- return "done"
21
- #return [os.path.join(result[0], img) for img in os.listdir(result[0])]
22
 
23
  with gr.Blocks() as demo:
24
  with gr.Column():
25
  prompt = gr.Textbox(placeholder="enter prompt")
26
  image = gr.Image(source="upload", type="filepath")
27
- #gallery_out = gr.Gallery()
28
- text_out = gr.Textbox()
29
  submit_btn = gr.Button("go")
30
 
31
  inputs = [
32
  prompt,
33
  image
34
  ]
35
- #outputs = [gallery_out]
36
-
37
- submit_btn.click(infer, inputs, text_out)
38
 
39
  demo.launch().queue()
 
17
  print(result)
18
  print(result[0])
19
  print(result[0][0])
20
+ # return "done"
21
+ return [os.path.join(result[0], img) for img in os.listdir(result[0])]
22
 
23
  with gr.Blocks() as demo:
24
  with gr.Column():
25
  prompt = gr.Textbox(placeholder="enter prompt")
26
  image = gr.Image(source="upload", type="filepath")
27
+ gallery_out = gr.Gallery()
28
+ #text_out = gr.Textbox()
29
  submit_btn = gr.Button("go")
30
 
31
  inputs = [
32
  prompt,
33
  image
34
  ]
35
+ outputs = [gallery_out]
36
+ outputs = [text_out]
37
+ submit_btn.click(infer, inputs, outputs)
38
 
39
  demo.launch().queue()