Update app.py
Browse files
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):
|