czl commited on
Commit
846f790
1 Parent(s): 70ca747

add CPU warning

Browse files
Files changed (1) hide show
  1. app.py +13 -5
app.py CHANGED
@@ -335,11 +335,19 @@ with gr.Blocks(title="Generative Date Augmentation") as demo:
335
  label="SSIM Score:", value="Generate to see score"
336
  )
337
  cos_sim = gr.Label(label="CLIP Score:", value="Generate to see score")
338
- gr.Markdown(
339
- f"""
340
- Currently running on {power_device}.
341
- """
342
- )
 
 
 
 
 
 
 
 
343
 
344
  run_button.click(
345
  fn=infer,
 
335
  label="SSIM Score:", value="Generate to see score"
336
  )
337
  cos_sim = gr.Label(label="CLIP Score:", value="Generate to see score")
338
+ if power_device == "GPU":
339
+ gr.Markdown(
340
+ f"""
341
+ Currently running on {power_device}.
342
+ """
343
+ )
344
+ else:
345
+ gr.Markdown(
346
+ f"""
347
+ Currently running on {power_device}.
348
+ Note: Running on CPU will take longer (approx. 6 minutes with default settings).
349
+ """
350
+ )
351
 
352
  run_button.click(
353
  fn=infer,