Spaces:
Running
on
Zero
Running
on
Zero
gaoyang07
commited on
Commit
·
f325f86
1
Parent(s):
685e40d
fix app.py
Browse files
app.py
CHANGED
|
@@ -7,11 +7,6 @@ import re
|
|
| 7 |
import time
|
| 8 |
import orjson
|
| 9 |
|
| 10 |
-
import gradio as gr
|
| 11 |
-
import numpy as np
|
| 12 |
-
import torch
|
| 13 |
-
from transformers import AutoModel, AutoProcessor
|
| 14 |
-
|
| 15 |
try:
|
| 16 |
import spaces
|
| 17 |
except ImportError:
|
|
@@ -25,6 +20,11 @@ except ImportError:
|
|
| 25 |
|
| 26 |
spaces = _SpacesFallback()
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
# Disable the broken cuDNN SDPA backend
|
| 29 |
torch.backends.cuda.enable_cudnn_sdp(False)
|
| 30 |
# Keep these enabled as fallbacks
|
|
|
|
| 7 |
import time
|
| 8 |
import orjson
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
try:
|
| 11 |
import spaces
|
| 12 |
except ImportError:
|
|
|
|
| 20 |
|
| 21 |
spaces = _SpacesFallback()
|
| 22 |
|
| 23 |
+
import gradio as gr
|
| 24 |
+
import numpy as np
|
| 25 |
+
import torch
|
| 26 |
+
from transformers import AutoModel, AutoProcessor
|
| 27 |
+
|
| 28 |
# Disable the broken cuDNN SDPA backend
|
| 29 |
torch.backends.cuda.enable_cudnn_sdp(False)
|
| 30 |
# Keep these enabled as fallbacks
|