Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -8,11 +8,9 @@ from gradio import Chatbot
|
|
8 |
from streaming import stream_to_gradio
|
9 |
from huggingface_hub import login
|
10 |
from gradio.data_classes import FileData
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
import torch
|
15 |
|
|
|
16 |
# Initialize ZeroGPU
|
17 |
if torch.cuda.is_available():
|
18 |
torch.backends.cudnn.benchmark = True
|
@@ -29,6 +27,9 @@ if torch.cuda.is_available():
|
|
29 |
ZeroGpu(use_cpu=False)
|
30 |
|
31 |
|
|
|
|
|
|
|
32 |
login(os.getenv("HUGGINGFACEHUB_API_TOKEN"), add_to_git_credential=True)
|
33 |
|
34 |
|
|
|
8 |
from streaming import stream_to_gradio
|
9 |
from huggingface_hub import login
|
10 |
from gradio.data_classes import FileData
|
|
|
|
|
|
|
11 |
import torch
|
12 |
|
13 |
+
|
14 |
# Initialize ZeroGPU
|
15 |
if torch.cuda.is_available():
|
16 |
torch.backends.cudnn.benchmark = True
|
|
|
27 |
ZeroGpu(use_cpu=False)
|
28 |
|
29 |
|
30 |
+
# Set HF_HOME
|
31 |
+
os.environ['HF_HOME'] = 'C:/Users/jpkor/data/.huggingface'
|
32 |
+
|
33 |
login(os.getenv("HUGGINGFACEHUB_API_TOKEN"), add_to_git_credential=True)
|
34 |
|
35 |
|