Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# #huggingface-llama-recipes : https://github.com/huggingface/huggingface-llama-recipes/tree/main
|
3 |
# import gradio as gr
|
4 |
# from openai import OpenAI
|
5 |
-
|
6 |
|
7 |
-
|
8 |
|
9 |
# client = OpenAI(
|
10 |
# base_url="https://integrate.api.nvidia.com/v1",
|
@@ -73,7 +73,7 @@ from openai import OpenAI
|
|
73 |
|
74 |
client = OpenAI(
|
75 |
base_url = "https://integrate.api.nvidia.com/v1",
|
76 |
-
api_key =
|
77 |
)
|
78 |
|
79 |
completion = client.chat.completions.create(
|
|
|
2 |
# #huggingface-llama-recipes : https://github.com/huggingface/huggingface-llama-recipes/tree/main
|
3 |
# import gradio as gr
|
4 |
# from openai import OpenAI
|
5 |
+
import os
|
6 |
|
7 |
+
ACCESS_TOKEN = os.getenv("HF_TOKEN")
|
8 |
|
9 |
# client = OpenAI(
|
10 |
# base_url="https://integrate.api.nvidia.com/v1",
|
|
|
73 |
|
74 |
client = OpenAI(
|
75 |
base_url = "https://integrate.api.nvidia.com/v1",
|
76 |
+
api_key = ACCESS_TOKEN
|
77 |
)
|
78 |
|
79 |
completion = client.chat.completions.create(
|