anzorq commited on
Commit
4d4b3ae
1 Parent(s): 5b734ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -124,9 +124,9 @@ def prepare_img(img):
124
 
125
  w, h = img.size
126
  if w > h:
127
- img = img.crop(((w-h)/2, 0, (w+h)/2, h))
128
  else:
129
- img = img.crop((0, (h-w)/2, w, (h+w)/2))
130
 
131
  # resize to 256x256
132
  img = img.resize((256, 256))
@@ -190,14 +190,13 @@ with gr.Blocks() as app:
190
  guidance_scale = gr.Slider(label="Guidance scale", value=3.0, minimum=3.0, maximum=10.0, step=1.0)
191
  grid_size = gr.Slider(label="Grid size", value=32, minimum=16, maximum=128, step=16)
192
 
193
- state_info = state_info = gr.Textbox(label="State", show_label=False).style(container=False)
194
-
195
  with gr.Column():
196
  plot = gr.Plot(label="Point cloud")
197
  # btn_pc_to_obj = gr.Button(value="Convert to OBJ", visible=False)
198
  model_3d = gr.Model3D(value=None)
199
  file_out = gr.File(label="Obj file", visible=False)
200
 
 
201
 
202
 
203
  # inputs = [dropdown_models, prompt, img, guidance_scale, grid_size]
@@ -215,7 +214,7 @@ with gr.Blocks() as app:
215
  <p>Space by:<br>
216
  <a href="https://twitter.com/hahahahohohe"><img src="https://img.shields.io/twitter/follow/hahahahohohe?label=%40anzorq&style=social" alt="Twitter Follow"></a><br>
217
  <a href="https://github.com/qunash"><img alt="GitHub followers" src="https://img.shields.io/github/followers/qunash?style=social" alt="Github Follow"></a></p><br>
218
- <a href="https://www.buymeacoffee.com/anzorq" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 35px !important;width: 120px !important;" ></a><br><br>
219
  <p><img src="https://visitor-badge.glitch.me/badge?page_id=anzorq.point-e_demo" alt="visitors"></p>
220
  </div>
221
  """)
 
124
 
125
  w, h = img.size
126
  if w > h:
127
+ img = img.crop((w - h) / 2, 0, w - (w - h) / 2, h)
128
  else:
129
+ img = img.crop((0, (h - w) / 2, w, h - (h - w) / 2))
130
 
131
  # resize to 256x256
132
  img = img.resize((256, 256))
 
190
  guidance_scale = gr.Slider(label="Guidance scale", value=3.0, minimum=3.0, maximum=10.0, step=1.0)
191
  grid_size = gr.Slider(label="Grid size", value=32, minimum=16, maximum=128, step=16)
192
 
 
 
193
  with gr.Column():
194
  plot = gr.Plot(label="Point cloud")
195
  # btn_pc_to_obj = gr.Button(value="Convert to OBJ", visible=False)
196
  model_3d = gr.Model3D(value=None)
197
  file_out = gr.File(label="Obj file", visible=False)
198
 
199
+ state_info = state_info = gr.Textbox(label="State", show_label=False).style(container=False)
200
 
201
 
202
  # inputs = [dropdown_models, prompt, img, guidance_scale, grid_size]
 
214
  <p>Space by:<br>
215
  <a href="https://twitter.com/hahahahohohe"><img src="https://img.shields.io/twitter/follow/hahahahohohe?label=%40anzorq&style=social" alt="Twitter Follow"></a><br>
216
  <a href="https://github.com/qunash"><img alt="GitHub followers" src="https://img.shields.io/github/followers/qunash?style=social" alt="Github Follow"></a></p><br>
217
+ <a href="https://www.buymeacoffee.com/anzorq" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px !important;width: 102px !important;" ></a><br><br>
218
  <p><img src="https://visitor-badge.glitch.me/badge?page_id=anzorq.point-e_demo" alt="visitors"></p>
219
  </div>
220
  """)