Spaces:
Runtime error
Runtime error
Update src/main.py
Browse files- src/main.py +5 -4
src/main.py
CHANGED
@@ -128,10 +128,11 @@ async def embed_sent(sentence, semaphore, tmp_file):
|
|
128 |
}
|
129 |
|
130 |
async with ClientSession(
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
135 |
) as session:
|
136 |
async with session.post(TEI_URL, json=payload) as resp:
|
137 |
if resp.status != 200:
|
|
|
128 |
}
|
129 |
|
130 |
async with ClientSession(
|
131 |
+
headers={
|
132 |
+
"Content-Type": "application/json",
|
133 |
+
"Authorization": f"Bearer {HF_TOKEN}"
|
134 |
+
},
|
135 |
+
trust_env=True
|
136 |
) as session:
|
137 |
async with session.post(TEI_URL, json=payload) as resp:
|
138 |
if resp.status != 200:
|