Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Hide alerts (#2)
Browse files- Hide alerts (c731bfc6e723e2ce39b6c2c2ddf00e40b2167427)
Co-authored-by: Ali Abid <aliabid94@users.noreply.huggingface.co>
app.py
CHANGED
@@ -12,7 +12,7 @@ headers = {
|
|
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 |
-
|
16 |
|
17 |
def predict(message, chatbot):
|
18 |
|
@@ -38,4 +38,4 @@ def predict(message, chatbot):
|
|
38 |
return response_json_object[0]['generated_text']
|
39 |
|
40 |
|
41 |
-
gr.ChatInterface(predict, title=title, description=description).queue(concurrency_count=40).launch()
|
|
|
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 |
|
17 |
def predict(message, chatbot):
|
18 |
|
|
|
38 |
return response_json_object[0]['generated_text']
|
39 |
|
40 |
|
41 |
+
gr.ChatInterface(predict, title=title, description=description, css=css).queue(concurrency_count=40).launch()
|