Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ from flask_cors import CORS
|
|
| 4 |
import json
|
| 5 |
import requests
|
| 6 |
import re
|
|
|
|
| 7 |
|
| 8 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 9 |
|
|
@@ -37,7 +38,7 @@ def split_text(text):
|
|
| 37 |
return result
|
| 38 |
|
| 39 |
def call_api(prompt_text):
|
| 40 |
-
url = "https://muryshev-mixtral-api-protocol.hf.space/completion"
|
| 41 |
payload = {"prompt": prompt_text, "temperature": 0, "seed": 42, "repeat_penalty": 1, "top_p": 0.95, "stream": False, "n_predict": 2000}
|
| 42 |
|
| 43 |
try:
|
|
|
|
| 4 |
import json
|
| 5 |
import requests
|
| 6 |
import re
|
| 7 |
+
import uuid
|
| 8 |
|
| 9 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 10 |
|
|
|
|
| 38 |
return result
|
| 39 |
|
| 40 |
def call_api(prompt_text):
|
| 41 |
+
url = "https://muryshev-mixtral-api-protocol.hf.space/completion?bypass_too_many_requests="+str(uuid.uuid4())
|
| 42 |
payload = {"prompt": prompt_text, "temperature": 0, "seed": 42, "repeat_penalty": 1, "top_p": 0.95, "stream": False, "n_predict": 2000}
|
| 43 |
|
| 44 |
try:
|