eliphatfs commited on
Commit
6cff14e
β€’
1 Parent(s): 796d131

Remove form.

Browse files
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -208,21 +208,20 @@ torch.set_grad_enabled(False)
208
  st.title("Zero123++ Demo")
209
  # st.caption("For faster inference without waiting in queue, you may clone the space and run it yourself.")
210
  prog = st.progress(0.0, "Idle")
211
- with st.form("imgform"):
212
- pic = st.file_uploader("Upload an Image", key='imageinput', type=['png', 'jpg', 'webp'])
213
- left, right = st.columns(2)
214
- with left:
215
- rem_input_bg = st.checkbox("Remove Input Background")
216
- with right:
217
- rem_output_bg = st.checkbox("Remove Output Background")
218
- num_inference_steps = st.slider("Number of Inference Steps", 15, 100, 75)
219
- st.caption("Diffusion Steps. For general real or synthetic objects, around 28 is enough. For objects with delicate details such as faces (either realistic or illustration), you may need 75 or more steps.")
220
- cfg_scale = st.slider("Classifier Free Guidance Scale", 1.0, 10.0, 4.0)
221
- seed = st.text_input("Seed", "42")
222
- submit = False
223
- if st.form_submit_button("Submit"):
224
- submit = True
225
- results_container = st.container()
226
  sample_got = image_examples(iret, 4, 'rimageinput')
227
  if sample_got:
228
  pic = sample_got
 
208
  st.title("Zero123++ Demo")
209
  # st.caption("For faster inference without waiting in queue, you may clone the space and run it yourself.")
210
  prog = st.progress(0.0, "Idle")
211
+ pic = st.file_uploader("Upload an Image", key='imageinput', type=['png', 'jpg', 'webp'])
212
+ left, right = st.columns(2)
213
+ with left:
214
+ rem_input_bg = st.checkbox("Remove Input Background")
215
+ with right:
216
+ rem_output_bg = st.checkbox("Remove Output Background")
217
+ num_inference_steps = st.slider("Number of Inference Steps", 15, 100, 75)
218
+ st.caption("Diffusion Steps. For general real or synthetic objects, around 28 is enough. For objects with delicate details such as faces (either realistic or illustration), you may need 75 or more steps.")
219
+ cfg_scale = st.slider("Classifier Free Guidance Scale", 1.0, 10.0, 4.0)
220
+ seed = st.text_input("Seed", "42")
221
+ submit = False
222
+ if st.button("Submit"):
223
+ submit = True
224
+ results_container = st.container()
 
225
  sample_got = image_examples(iret, 4, 'rimageinput')
226
  if sample_got:
227
  pic = sample_got