Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ UL2_API_URL = "https://api-inference.huggingface.co/models/google/flan-ul2"
|
|
9 |
FLAN_API_URL = "https://api-inference.huggingface.co/models/google/flan-t5-xxl"
|
10 |
|
11 |
headers = {"Authorization": f"Bearer {TOKEN}"}
|
12 |
-
MAX_NEW_TOKENS =
|
13 |
|
14 |
def query(text, api_url):
|
15 |
response = requests.post(api_url, headers=headers, json={"inputs":text, "parameters": {"max_new_tokens":MAX_NEW_TOKENS}})
|
|
|
9 |
FLAN_API_URL = "https://api-inference.huggingface.co/models/google/flan-t5-xxl"
|
10 |
|
11 |
headers = {"Authorization": f"Bearer {TOKEN}"}
|
12 |
+
MAX_NEW_TOKENS = 256
|
13 |
|
14 |
def query(text, api_url):
|
15 |
response = requests.post(api_url, headers=headers, json={"inputs":text, "parameters": {"max_new_tokens":MAX_NEW_TOKENS}})
|