Spaces:
Sleeping
Sleeping
khouraisan
commited on
Commit
ยท
f3a0b41
1
Parent(s):
b2c7cdf
update
Browse files
app.py
CHANGED
@@ -97,14 +97,15 @@ demo = gr.Interface(
|
|
97 |
title="Fumo Classifier (LoRA)",
|
98 |
description="Drop an image to check if it's a Fumo!",
|
99 |
examples=["examples/fumo1.jpg", "examples/fumo2.jpg", "examples/no_fumo1.jpg", "examples/no_fumo2.jpg", "examples/no_fumo3.png"],
|
100 |
-
|
101 |
flagging_options=["Correct ๐", "Incorrect ๐"],
|
102 |
head=htmlhead,
|
103 |
)
|
104 |
|
105 |
if __name__== "__main__":
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
109 |
|
110 |
demo.launch()
|
|
|
97 |
title="Fumo Classifier (LoRA)",
|
98 |
description="Drop an image to check if it's a Fumo!",
|
99 |
examples=["examples/fumo1.jpg", "examples/fumo2.jpg", "examples/no_fumo1.jpg", "examples/no_fumo2.jpg", "examples/no_fumo3.png"],
|
100 |
+
flagging_mode="manual",
|
101 |
flagging_options=["Correct ๐", "Incorrect ๐"],
|
102 |
head=htmlhead,
|
103 |
)
|
104 |
|
105 |
if __name__== "__main__":
|
106 |
+
has_bf16 = torch.cuda.is_bf16_supported() if torch.cuda.is_available() else False
|
107 |
+
# or for CPU:
|
108 |
+
has_bf16_cpu = torch.cpu.is_bf16_supported() if hasattr(torch.cpu, 'is_bf16_supported') else False
|
109 |
+
print(f"BF16 support: {has_bf16} (GPU), {has_bf16_cpu} (CPU)")
|
110 |
|
111 |
demo.launch()
|