Spaces:
Sleeping
Sleeping
Shreya Pal commited on
Commit ·
eb29ff9
1
Parent(s): 84f2df9
Update deprecated Hugging Face inference pipeline endpoint to HF Router URL mapping
Browse files- server/app.py +1 -1
server/app.py
CHANGED
|
@@ -128,7 +128,7 @@ Respond with exactly this format:
|
|
| 128 |
{{\"decision\": \"allow\" or \"flag\" or \"remove\", \"confidence\": <0.0-1.0>, \"explanation\": \"<1 sentence reason>\"}} [/INST]"""
|
| 129 |
|
| 130 |
response = requests.post(
|
| 131 |
-
"https://
|
| 132 |
headers={"Authorization": f"Bearer {api_key}"},
|
| 133 |
json={"inputs": prompt, "parameters": {"max_new_tokens": 100, "return_full_text": False}},
|
| 134 |
timeout=30
|
|
|
|
| 128 |
{{\"decision\": \"allow\" or \"flag\" or \"remove\", \"confidence\": <0.0-1.0>, \"explanation\": \"<1 sentence reason>\"}} [/INST]"""
|
| 129 |
|
| 130 |
response = requests.post(
|
| 131 |
+
"https://router.huggingface.co/hf-inference/models/mistralai/Mistral-7B-Instruct-v0.3",
|
| 132 |
headers={"Authorization": f"Bearer {api_key}"},
|
| 133 |
json={"inputs": prompt, "parameters": {"max_new_tokens": 100, "return_full_text": False}},
|
| 134 |
timeout=30
|