X-iZhang commited on
Commit
5322748
·
verified ·
1 Parent(s): a388fcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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) # 根据你的 CPU 核心数调整
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