Spaces:
Running
on
Zero
Running
on
Zero
add CPU warning
Browse files
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 |
-
|
339 |
-
|
340 |
-
|
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,
|