khouraisan commited on
Commit
f3a0b41
ยท
1 Parent(s): b2c7cdf
Files changed (1) hide show
  1. app.py +5 -4
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
- allow_flagging="manual",
101
  flagging_options=["Correct ๐Ÿ‘", "Incorrect ๐Ÿ‘Ž"],
102
  head=htmlhead,
103
  )
104
 
105
  if __name__== "__main__":
106
- import platform
107
- cpu_info = platform.processor()
108
- print(f"CPU: {cpu_info}")
 
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()