Akjava commited on
Commit
3a6ee12
1 Parent(s): 11a5ab2

change example

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -49,9 +49,9 @@ def example_out(image,image_mask,prompt,strength,example_id):
49
  #parent,file=os.path.split(image_mask) # image is complex dict
50
  #base,ext = os.path.splitext(file)
51
  #key = base.split("_")[0]
52
-
53
- loaded_image = Image.open(f"images/{example_id}.jpg")
54
- return loaded_image
55
  #return np.array(loaded_image)
56
 
57
  css="""
@@ -87,7 +87,8 @@ with demo_blocks as demo:
87
  id_input=gr.Text(label="Name", visible=False)
88
 
89
  with gr.Column():
90
- image_out = gr.Image(height=800,sources=[],label="Output", elem_id="output-img",type="pil",format="jpeg")
 
91
 
92
 
93
 
@@ -102,7 +103,7 @@ with demo_blocks as demo:
102
  ,
103
  fn=example_out,
104
  inputs=[image,image_mask,prompt,strength,id_input],
105
- outputs=[image_out],
106
  cache_examples=True,
107
  )
108
  gr.HTML(
 
49
  #parent,file=os.path.split(image_mask) # image is complex dict
50
  #base,ext = os.path.splitext(file)
51
  #key = base.split("_")[0]
52
+ return f"images/{example_id}.jpg"
53
+ #loaded_image = Image.open(f"images/{example_id}.jpg")
54
+ #return loaded_image
55
  #return np.array(loaded_image)
56
 
57
  css="""
 
87
  id_input=gr.Text(label="Name", visible=False)
88
 
89
  with gr.Column():
90
+ image_out = gr.Image(height=800,sources=[],label="Output", elem_id="output-img",format="jpeg")
91
+ test_out = gr.Image(sources=[],label="Example", elem_id="output-img",type="filepath")
92
 
93
 
94
 
 
103
  ,
104
  fn=example_out,
105
  inputs=[image,image_mask,prompt,strength,id_input],
106
+ outputs=[test_out],
107
  cache_examples=True,
108
  )
109
  gr.HTML(