Spaces:
Runtime error
Runtime error
Update chain_app.py
Browse files- chain_app.py +2 -2
chain_app.py
CHANGED
@@ -2332,8 +2332,8 @@ async def main(message: cl.Message):
|
|
2332 |
API_URL = "https://api-inference.huggingface.co/models/meta-llama/Meta-Llama-3.1-405B"
|
2333 |
headers = {"Authorization": "Bearer hf_token_llama_3_1"}
|
2334 |
def query(payload):
|
2335 |
-
|
2336 |
-
|
2337 |
|
2338 |
output = query({
|
2339 |
"inputs": message.content,
|
|
|
2332 |
API_URL = "https://api-inference.huggingface.co/models/meta-llama/Meta-Llama-3.1-405B"
|
2333 |
headers = {"Authorization": "Bearer hf_token_llama_3_1"}
|
2334 |
def query(payload):
|
2335 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
2336 |
+
return response.json()
|
2337 |
|
2338 |
output = query({
|
2339 |
"inputs": message.content,
|