cygon24 commited on
Commit
5f0ade5
·
verified ·
1 Parent(s): 9ec6415

Update app.py

Browse files

As of April 2025, version 4.39.3 of transformers is stable with DETR and avoids the init_empty_weights bug.

Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,6 +1,10 @@
1
 
2
  # Install dependencies manually if not found
3
- import os; os.system("pip install gradio pillow transformers")
 
 
 
 
4
 
5
 
6
  import gradio as gr
 
1
 
2
  # Install dependencies manually if not found
3
+ # import os; os.system("pip install gradio pillow transformers")
4
+ #As of April 2025, version 4.39.3 of transformers is stable with DETR and avoids the init_empty_weights bug.
5
+ import os
6
+ os.system("pip install --upgrade torch torchvision torchaudio transformers==4.39.3 gradio pillow")
7
+
8
 
9
 
10
  import gradio as gr