Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
title and desc
Browse files
app.py
CHANGED
@@ -10,12 +10,11 @@ headers = {
|
|
10 |
}
|
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 |
|
14 |
|
15 |
def predict(message, chatbot):
|
16 |
-
|
17 |
-
title = "Llama2 70B Chatbot : Explore exclusively on HuggingFace"
|
18 |
-
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/). """
|
19 |
|
20 |
print(f"Logging: message is - {message}")
|
21 |
print(f"Logging: chatbot is - {chatbot}")
|
@@ -39,4 +38,4 @@ def predict(message, chatbot):
|
|
39 |
return response_json_object[0]['generated_text']
|
40 |
|
41 |
|
42 |
-
gr.ChatInterface(predict).queue().launch(debug= True)
|
|
|
10 |
}
|
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 : Explore exclusively on HuggingFace"
|
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 |
|
19 |
print(f"Logging: message is - {message}")
|
20 |
print(f"Logging: chatbot is - {chatbot}")
|
|
|
38 |
return response_json_object[0]['generated_text']
|
39 |
|
40 |
|
41 |
+
gr.ChatInterface(predict, title=title, description=description).queue().launch(debug= True)
|