bezzam HF Staff commited on
Commit
7e86d1e
·
verified ·
1 Parent(s): 2508584

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -1,9 +1,10 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
- import os
5
- HF_TOKEN = os.environ["HF_TOKEN"]
6
- client = InferenceClient(token=HF_TOKEN, model="openai/gpt-oss-20b", bill_to="LauzHack")
 
7
 
8
 
9
  def respond(
@@ -18,8 +19,8 @@ def respond(
18
  """
19
  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
20
  """
21
- # client = InferenceClient(token=hf_token.token, model="openai/gpt-oss-20b", bill_to="LauzHack")
22
- # client = InferenceClient(token=hf_token.token, model="openai/gpt-oss-20b") # Bills to personal account
23
 
24
  messages = [{"role": "system", "content": system_message}]
25
 
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
+ ### NOTE: To use a token that bills to LauzHack cannot use OAuth tokens!
5
+ # import os
6
+ # HF_TOKEN = os.environ["HF_TOKEN"]
7
+ # client = InferenceClient(token=HF_TOKEN, model="openai/gpt-oss-20b", bill_to="LauzHack")
8
 
9
 
10
  def respond(
 
19
  """
20
  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
21
  """
22
+ ### NOTE: `bill_to` cannot be used here as this is an OAuth tokens through logging in
23
+ client = InferenceClient(token=hf_token.token, model="openai/gpt-oss-20b") # Bills to personal account
24
 
25
  messages = [{"role": "system", "content": system_message}]
26