Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
updated description
Browse files
app.py
CHANGED
@@ -11,7 +11,19 @@ headers = {
|
|
11 |
|
12 |
system_message = "\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."
|
13 |
title = "Llama2 70B Chatbot"
|
14 |
-
description = """This Space demonstrates model [Llama-2-70b-chat-hf](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf) by Meta, running on Inference Endpoints using text-generation-inference. To have your own dedicated endpoint, you can [deploy it on Inference Endpoints](https://ui.endpoints.huggingface.co/). """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
css = """.toast-wrap { display: none !important } """
|
16 |
examples=[
|
17 |
'Hello there! How are you doing?',
|
@@ -21,6 +33,7 @@ examples=[
|
|
21 |
"Write a 100-word article on 'Benefits of Open-Source in AI research'",
|
22 |
]
|
23 |
|
|
|
24 |
def predict(message, chatbot):
|
25 |
|
26 |
input_prompt = f"[INST] <<SYS>>\n{system_message}\n<</SYS>>\n\n "
|
|
|
11 |
|
12 |
system_message = "\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."
|
13 |
title = "Llama2 70B Chatbot"
|
14 |
+
#description = """This Space demonstrates model [Llama-2-70b-chat-hf](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf) by Meta, running on Inference Endpoints using text-generation-inference. To have your own dedicated endpoint, you can [deploy it on Inference Endpoints](https://ui.endpoints.huggingface.co/). """
|
15 |
+
description = """
|
16 |
+
This Space demonstrates model [Llama-2-70b-chat-hf](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf) by Meta, a Llama 2 model with 70B parameters fine-tuned for chat instructions. This space is running on Inference Endpoints using text-generation-inference library. If you want to run your own service, you can also [deploy the model on Inference Endpoints](https://ui.endpoints.huggingface.co/).
|
17 |
+
|
18 |
+
🔎 For more details about the Llama 2 family of models and how to use them with `transformers`, take a look [at our blog post](https://huggingface.co/blog/llama2).
|
19 |
+
|
20 |
+
🔨 Looking for a lighter chat model version of Llama-v2? Check out the large [7B Chat model demo](https://huggingface.co/spaces/huggingface-projects/llama-2-7b-chat).
|
21 |
+
|
22 |
+
---
|
23 |
+
|
24 |
+
Note: As a derivate work of [Llama-2-70b-chat](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf) by Meta,
|
25 |
+
this demo is governed by the original [license](https://huggingface.co/spaces/ysharma/Explore_llamav2_with_TGI/blob/main/LICENSE.txt) and [acceptable use policy](https://huggingface.co/spaces/ysharma/Explore_llamav2_with_TGI/blob/main/USE_POLICY.md).
|
26 |
+
"""
|
27 |
css = """.toast-wrap { display: none !important } """
|
28 |
examples=[
|
29 |
'Hello there! How are you doing?',
|
|
|
33 |
"Write a 100-word article on 'Benefits of Open-Source in AI research'",
|
34 |
]
|
35 |
|
36 |
+
|
37 |
def predict(message, chatbot):
|
38 |
|
39 |
input_prompt = f"[INST] <<SYS>>\n{system_message}\n<</SYS>>\n\n "
|