guoday commited on
Commit
40c119c
1 Parent(s): 21100f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -18,15 +18,15 @@ DESCRIPTION = """\
18
  This Space demonstrates model [DeepSeek-Coder](https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct) by DeepSeek, a code model with 6.7B parameters fine-tuned for chat instructions.
19
  """
20
 
21
- if not torch.cuda.is_available():
22
- DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
23
 
24
 
25
- if torch.cuda.is_available():
26
- model_id = "deepseek-ai/deepseek-coder-33b-instruct"
27
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
28
- tokenizer = AutoTokenizer.from_pretrained(model_id)
29
- tokenizer.use_default_system_prompt = False
30
 
31
 
32
 
@@ -121,7 +121,7 @@ chat_interface = gr.ChatInterface(
121
  value=1,
122
  ),
123
  ],
124
- stop_btn=None,
125
  examples=[
126
  ["implement snake game using pygame"],
127
  ["Can you explain briefly to me what is the Python programming language?"],
 
18
  This Space demonstrates model [DeepSeek-Coder](https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct) by DeepSeek, a code model with 6.7B parameters fine-tuned for chat instructions.
19
  """
20
 
21
+ # if not torch.cuda.is_available():
22
+ # DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
23
 
24
 
25
+ # if torch.cuda.is_available():
26
+ # model_id = "deepseek-ai/deepseek-coder-33b-instruct"
27
+ # model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
28
+ # tokenizer = AutoTokenizer.from_pretrained(model_id)
29
+ # tokenizer.use_default_system_prompt = False
30
 
31
 
32
 
 
121
  value=1,
122
  ),
123
  ],
124
+ stop_btn=True,
125
  examples=[
126
  ["implement snake game using pygame"],
127
  ["Can you explain briefly to me what is the Python programming language?"],