hysts HF staff commited on
Commit
eca3893
1 Parent(s): d534002

Add workaround for the bitsandbytes import issue

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,6 +1,11 @@
1
  from threading import Thread
2
  from typing import Iterator
3
 
 
 
 
 
 
4
  import gradio as gr
5
  import spaces
6
  import torch
 
1
  from threading import Thread
2
  from typing import Iterator
3
 
4
+ # We need to run this before importing gradio and spaces to avoid the weird error related to bitsandbytes
5
+ from bitsandbytes.cuda_setup.main import CUDASetup
6
+
7
+ setup = CUDASetup.get_instance()
8
+
9
  import gradio as gr
10
  import spaces
11
  import torch