Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
import sys
|
3 |
import os
|
|
|
4 |
|
5 |
def setup_cpu_environment():
|
6 |
os.environ['CUDA_VISIBLE_DEVICES'] = ''
|
7 |
|
8 |
-
torch.set_num_threads(4)
|
9 |
|
10 |
os.environ['TOKENIZERS_PARALLELISM'] = 'false'
|
11 |
|
|
|
1 |
import gradio as gr
|
2 |
import sys
|
3 |
import os
|
4 |
+
import torch
|
5 |
|
6 |
def setup_cpu_environment():
|
7 |
os.environ['CUDA_VISIBLE_DEVICES'] = ''
|
8 |
|
9 |
+
torch.set_num_threads(4)
|
10 |
|
11 |
os.environ['TOKENIZERS_PARALLELISM'] = 'false'
|
12 |
|