muryshev commited on
Commit
9171f49
1 Parent(s): 5c9319c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- # import os
6
 
7
- # ACCESS_TOKEN = os.getenv("HF_TOKEN")
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 = "$API_KEY_REQUIRED_IF_EXECUTING_OUTSIDE_NGC"
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(