Spaces:
kadirnar
/
Running on Zero

fffiloni commited on
Commit
657e75b
1 Parent(s): a1bf3fa

Update demo_gradio.py

Browse files
Files changed (1) hide show
  1. demo_gradio.py +22 -15
demo_gradio.py CHANGED
@@ -164,19 +164,26 @@ def greet(input_image, material_exemplar):
164
 
165
  return images[0]
166
 
 
 
 
 
 
 
167
 
168
-
169
- input_image = gr.Image(type="pil")
170
- input_image2 = gr.Image(type="pil")
171
-
172
- demo = gr.Interface(
173
- fn=greet,
174
- inputs=[input_image, input_image2],
175
- title="ZeST: Zero-Shot Material Transfer from a Single Image",
176
- description="Upload two images -- input image and material exemplar. ZeST extracts the material from the exemplar and cast it onto the input image following the original lighting cues.",
177
- outputs=["image"],
178
- allow_flagging='never'
179
-
180
- )
181
-
182
- demo.launch()
 
 
164
 
165
  return images[0]
166
 
167
+ css = """
168
+ #col-container{
169
+ margin: 0 auto;
170
+ max-width: 1080px;
171
+ }
172
+ """
173
 
174
+ with gr.Blocks(css=css) as demo:
175
+ with gr.Column(elem_id="col-container"):
176
+ gr.Markdown("""
177
+ # ZeST: Zero-Shot Material Transfer from a Single Image
178
+ Upload two images -- input image and material exemplar. ZeST extracts the material from the exemplar and cast it onto the input image following the original lighting cues.
179
+ """)
180
+ with gr.Row():
181
+ with gr.Column():
182
+ with gr.Row():
183
+ input_image = gr.Image(type="pil")
184
+ input_image2 = gr.Image(type="pil")
185
+ submit_btn = gr.Button("Submit")
186
+ output_image = gr.Image()
187
+ submit_btn.click(fn=greet, inputs=[input_image, input_image2], outputs=[output_image])
188
+
189
+ demo.queue().launch()