Omnibus commited on
Commit
e312479
1 Parent(s): 21bcef9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -238,8 +238,11 @@ def build_space(t_space,t_title,t_description=None,t_name=None,t_redirect=None,t
238
  if t_redirect == None:
239
  t_redirect = t_space
240
  if t_name == None:
241
- t_name = t_space.split("//",1)[1].split(".hf",1)[0]
 
242
  print (t_name)
 
 
243
 
244
 
245
  model_id=t_name
@@ -547,7 +550,7 @@ with gr.Blocks() as build_app:
547
  t_image.change(up_c,[t_image,c_slider],c_image)
548
  c_upbtn.click(slide_fn,c_slider,c_image)
549
  build_button.click(build_space,[t_space,t_title,t_description,t_name,t_redirect,t_image,t_image_url,option_token],output_html)
550
- dl_button.click(make_files,[t_name,t_space,t_title,t_description,t_redirect,t_image,t_image_url,option_token],files_out)
551
 
552
  def_im.click(d_im,None,t_image)
553
  build_app.queue(concurrency_count=10).launch()
 
238
  if t_redirect == None:
239
  t_redirect = t_space
240
  if t_name == None:
241
+ print (t_space)
242
+ t_name = t_space.split("//",1)[1]
243
  print (t_name)
244
+ t_name = t_name.strip(".hf.space")
245
+ print (f't_name::{t_name}')
246
 
247
 
248
  model_id=t_name
 
550
  t_image.change(up_c,[t_image,c_slider],c_image)
551
  c_upbtn.click(slide_fn,c_slider,c_image)
552
  build_button.click(build_space,[t_space,t_title,t_description,t_name,t_redirect,t_image,t_image_url,option_token],output_html)
553
+ dl_button.click(make_files,[t_space,t_title,t_description,t_name,t_redirect,t_image,t_image_url,option_token],files_out)
554
 
555
  def_im.click(d_im,None,t_image)
556
  build_app.queue(concurrency_count=10).launch()