Update apis/chat_api.py
Browse files- apis/chat_api.py +1 -1
apis/chat_api.py
CHANGED
@@ -192,7 +192,7 @@ class ChatAPIApp:
|
|
192 |
api_url = f"https://api-inference.huggingface.co/pipeline/feature-extraction/{request.model}"
|
193 |
headers = {"Authorization": f"Bearer {api_key}"}
|
194 |
|
195 |
-
response = requests.post(api_url, headers=headers, json={"inputs": request.input})
|
196 |
result = response.json()
|
197 |
|
198 |
if "error" in result:
|
|
|
192 |
api_url = f"https://api-inference.huggingface.co/pipeline/feature-extraction/{request.model}"
|
193 |
headers = {"Authorization": f"Bearer {api_key}"}
|
194 |
|
195 |
+
response = await requests.post(api_url, headers=headers, json={"inputs": request.input})
|
196 |
result = response.json()
|
197 |
|
198 |
if "error" in result:
|