chamalnayaka commited on
Commit
14ed19e
·
verified ·
1 Parent(s): 541fbbe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -7,6 +7,10 @@
7
  #demo.launch()
8
 
9
  import requests
 
 
 
 
10
  API_URL = "https://api-inference.huggingface.co/models/gpt2"
11
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
12
  def query(payload):
 
7
  #demo.launch()
8
 
9
  import requests
10
+ import os
11
+
12
+ API_TOKEN = os.getenv("API_KEY")
13
+
14
  API_URL = "https://api-inference.huggingface.co/models/gpt2"
15
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
16
  def query(payload):