Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,13 +6,10 @@ from huggingface_hub import InferenceClient
|
|
| 6 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 7 |
"""
|
| 8 |
|
| 9 |
-
client = InferenceClient("
|
| 10 |
|
| 11 |
api_key = os.environ.get("NINJA_API")
|
| 12 |
-
|
| 13 |
-
completion = client.chat.completions.create(
|
| 14 |
-
model = "nvidia/Llama-3.1-Nemotron-8B-UltraLong-4M-Instruct"
|
| 15 |
-
|
| 16 |
PERSONALITY = os.environ.get("CHATBOT_PERSONALITY")
|
| 17 |
|
| 18 |
def role(message, history):
|
|
@@ -29,7 +26,6 @@ def role(message, history):
|
|
| 29 |
history.append({"role": "assistant", "content": response})
|
| 30 |
|
| 31 |
return history, history
|
| 32 |
-
)
|
| 33 |
|
| 34 |
"""
|
| 35 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
|
|
|
| 6 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 7 |
"""
|
| 8 |
|
| 9 |
+
client = InferenceClient("nvidia/Llama-3.1-Nemotron-8B-UltraLong-4M-Instruct")
|
| 10 |
|
| 11 |
api_key = os.environ.get("NINJA_API")
|
| 12 |
+
|
|
|
|
|
|
|
|
|
|
| 13 |
PERSONALITY = os.environ.get("CHATBOT_PERSONALITY")
|
| 14 |
|
| 15 |
def role(message, history):
|
|
|
|
| 26 |
history.append({"role": "assistant", "content": response})
|
| 27 |
|
| 28 |
return history, history
|
|
|
|
| 29 |
|
| 30 |
"""
|
| 31 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|