multimodalart HF staff commited on
Commit
aa694ec
·
verified ·
1 Parent(s): 540aa2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -229,7 +229,7 @@ h3{margin-top: 0}
229
  #component-1{text-align:center}
230
  .main_ui_logged_out{opacity: 0.3; pointer-events: none}
231
  .tabitem{border: 0px}
232
- #cost_preview_info{padding: .5em}
233
  """
234
 
235
  def swap_visibilty(profile: Union[gr.OAuthProfile, None]):
@@ -253,7 +253,7 @@ def update_pricing(steps, oauth_token: Union[gr.OAuthToken, None]):
253
  if(user["canPay"]):
254
  return gr.update(visible=True), cost_preview, gr.update(visible=False), gr.update(visible=True)
255
  else:
256
- pay_disclaimer = f'''<b>## ⚠️ {user["name"]}, your account doesn't have a payment method. Set one up <a href='https://huggingface.co/settings/billing/payment' target='_blank'>here</a> and come back here to train your LoRA<br>'''
257
  return gr.update(visible=True), pay_disclaimer+cost_preview, gr.update(visible=True), gr.update(visible=False)
258
  else:
259
  return gr.update(visible=False), "", gr.update(visible=False), gr.update(visible=True)
@@ -282,7 +282,7 @@ with gr.Blocks(theme=theme, css=css) as demo:
282
  placeholder="uncommon word like p3rs0n or trtcrd, or sentence like 'in the style of CNSTLL'",
283
  interactive=True,
284
  )
285
- with gr.Group(visible=True) as image_upload:
286
  with gr.Row():
287
  images = gr.File(
288
  file_types=["image"],
@@ -337,7 +337,7 @@ with gr.Blocks(theme=theme, css=css) as demo:
337
  sample_1 = gr.Textbox(label="Test prompt 1")
338
  sample_2 = gr.Textbox(label="Test prompt 2")
339
  sample_3 = gr.Textbox(label="Test prompt 3")
340
- with gr.Column(visible=False) as cost_preview:
341
  cost_preview_info = gr.Markdown(elem_id="cost_preview_info")
342
  payment_update = gr.Button("I have set up a payment method", visible=False)
343
  output_components.append(sample)
 
229
  #component-1{text-align:center}
230
  .main_ui_logged_out{opacity: 0.3; pointer-events: none}
231
  .tabitem{border: 0px}
232
+ .group_padding{padding: .5em}
233
  """
234
 
235
  def swap_visibilty(profile: Union[gr.OAuthProfile, None]):
 
253
  if(user["canPay"]):
254
  return gr.update(visible=True), cost_preview, gr.update(visible=False), gr.update(visible=True)
255
  else:
256
+ pay_disclaimer = f'''## ⚠️ {user["name"]}, your account doesn't have a payment method. Set one up <a href='https://huggingface.co/settings/billing/payment' target='_blank'>here</a> and come back here to train your LoRA<br>'''
257
  return gr.update(visible=True), pay_disclaimer+cost_preview, gr.update(visible=True), gr.update(visible=False)
258
  else:
259
  return gr.update(visible=False), "", gr.update(visible=False), gr.update(visible=True)
 
282
  placeholder="uncommon word like p3rs0n or trtcrd, or sentence like 'in the style of CNSTLL'",
283
  interactive=True,
284
  )
285
+ with gr.Group(visible=True, elem_classes="group_padding") as image_upload:
286
  with gr.Row():
287
  images = gr.File(
288
  file_types=["image"],
 
337
  sample_1 = gr.Textbox(label="Test prompt 1")
338
  sample_2 = gr.Textbox(label="Test prompt 2")
339
  sample_3 = gr.Textbox(label="Test prompt 3")
340
+ with gr.Group(visible=False, elem_classes="group_padding") as cost_preview:
341
  cost_preview_info = gr.Markdown(elem_id="cost_preview_info")
342
  payment_update = gr.Button("I have set up a payment method", visible=False)
343
  output_components.append(sample)