Update app.py
Browse files
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 |
-
|
23 |
|
24 |
|
25 |
-
if torch.cuda.is_available():
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
|
31 |
|
32 |
|
@@ -121,7 +121,7 @@ chat_interface = gr.ChatInterface(
|
|
121 |
value=1,
|
122 |
),
|
123 |
],
|
124 |
-
stop_btn=
|
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?"],
|