Spaces:
Running
on
Zero
Running
on
Zero
oweller2
commited on
Commit
·
cddcd13
1
Parent(s):
39bc5aa
remove pre-cache
Browse files
app.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
import sys
|
|
|
|
|
2 |
import warnings
|
3 |
import spaces
|
4 |
from threading import Thread
|
@@ -15,10 +17,6 @@ import math
|
|
15 |
print(f"NumPy version: {np.__version__}")
|
16 |
print(f"PyTorch version: {torch.__version__}")
|
17 |
|
18 |
-
# cp the .gradio examples to /home/user/app/.gradio/
|
19 |
-
import os
|
20 |
-
import shutil
|
21 |
-
|
22 |
# Suppress CUDA initialization warning
|
23 |
warnings.filterwarnings("ignore", category=UserWarning, message="Can't initialize NVML")
|
24 |
|
@@ -191,4 +189,7 @@ if __name__ == "__main__":
|
|
191 |
repo_id="orionweller/rank1-7b-awq",
|
192 |
)
|
193 |
print(f"Downloaded model to: {MODEL_PATH}")
|
|
|
|
|
|
|
194 |
demo.launch(share=True)
|
|
|
1 |
import sys
|
2 |
+
import os
|
3 |
+
import shutil
|
4 |
import warnings
|
5 |
import spaces
|
6 |
from threading import Thread
|
|
|
17 |
print(f"NumPy version: {np.__version__}")
|
18 |
print(f"PyTorch version: {torch.__version__}")
|
19 |
|
|
|
|
|
|
|
|
|
20 |
# Suppress CUDA initialization warning
|
21 |
warnings.filterwarnings("ignore", category=UserWarning, message="Can't initialize NVML")
|
22 |
|
|
|
189 |
repo_id="orionweller/rank1-7b-awq",
|
190 |
)
|
191 |
print(f"Downloaded model to: {MODEL_PATH}")
|
192 |
+
# Create the cached_examples directory if it doesn't exist
|
193 |
+
os.makedirs("/home/user/app/.gradio/", exist_ok=True)
|
194 |
+
shutil.copytree("/home/user/app/.gradio/examples", "/home/user/app/.gradio/examples")
|
195 |
demo.launch(share=True)
|