aliabd HF staff commited on
Commit
70c9ba6
1 Parent(s): cb1417f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,8 +3,10 @@
3
  # imports
4
  import gradio as gr
5
 
 
 
6
  # load a model from https://hf.co/models as an interface, then use it as an api
7
- api = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
8
 
9
  # define the core function
10
  def complete_with_gpt(text):
 
3
  # imports
4
  import gradio as gr
5
 
6
+ auth_token = os.getenv("auth_token")
7
+
8
  # load a model from https://hf.co/models as an interface, then use it as an api
9
+ api = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B", api_key=auth_token)
10
 
11
  # define the core function
12
  def complete_with_gpt(text):