aladdin1995 commited on
Commit
de5ca72
·
verified ·
1 Parent(s): d84e57e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -28,6 +28,7 @@ def replace_single_quotes(text):
28
 
29
  class PromptEnhancerV2:
30
  def __init__(self, models_root_path, device_map="cuda", torch_dtype="bfloat16"):#auto
 
31
  if not logging.getLogger(__name__).handlers:
32
  logging.basicConfig(level=logging.INFO)
33
  self.logger = logging.getLogger(__name__)
@@ -57,7 +58,7 @@ class PromptEnhancerV2:
57
  temperature=0.0,
58
  top_p=1.0,
59
  max_new_tokens=2048,
60
- device="cuda",
61
  ):
62
  org_prompt_cot = prompt_cot
63
  try:
@@ -122,7 +123,7 @@ class PromptEnhancerV2:
122
  temperature=0.1,
123
  top_p=1.0,
124
  max_new_tokens=2048,
125
- device="cuda",
126
  ):
127
  org_prompt_cot = prompt_cot
128
 
 
28
 
29
  class PromptEnhancerV2:
30
  def __init__(self, models_root_path, device_map="cuda", torch_dtype="bfloat16"):#auto
31
+ device_map = "cuda:0"
32
  if not logging.getLogger(__name__).handlers:
33
  logging.basicConfig(level=logging.INFO)
34
  self.logger = logging.getLogger(__name__)
 
58
  temperature=0.0,
59
  top_p=1.0,
60
  max_new_tokens=2048,
61
+ device="cuda:0",
62
  ):
63
  org_prompt_cot = prompt_cot
64
  try:
 
123
  temperature=0.1,
124
  top_p=1.0,
125
  max_new_tokens=2048,
126
+ device="cuda:0",
127
  ):
128
  org_prompt_cot = prompt_cot
129