Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,7 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, seed=None, sa
|
|
19 |
|
20 |
|
21 |
API_TOKEN = random.choice([os.getenv("HF_READ_TOKEN"), os.getenv("HF_READ_TOKEN_2"), os.getenv("HF_READ_TOKEN_3"), os.getenv("HF_READ_TOKEN_4"), os.getenv("HF_READ_TOKEN_5")]) # it is free
|
|
|
22 |
language = detect(prompt)
|
23 |
key = random.randint(0, 999)
|
24 |
|
|
|
19 |
|
20 |
|
21 |
API_TOKEN = random.choice([os.getenv("HF_READ_TOKEN"), os.getenv("HF_READ_TOKEN_2"), os.getenv("HF_READ_TOKEN_3"), os.getenv("HF_READ_TOKEN_4"), os.getenv("HF_READ_TOKEN_5")]) # it is free
|
22 |
+
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
23 |
language = detect(prompt)
|
24 |
key = random.randint(0, 999)
|
25 |
|