Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,9 +16,9 @@ def process_inputs(model_id, q_method, email, oauth_token: gr.OAuthToken | None,
|
|
16 |
if input_hash in processed_inputs and processed_inputs[input_hash] == 200:
|
17 |
return "This request has already been submitted successfully. Please do not submit the same request multiple times."
|
18 |
|
19 |
-
url = "
|
20 |
|
21 |
-
|
22 |
"repository_url": f"https://huggingface.co/{model_id}",
|
23 |
"username": profile.username,
|
24 |
"access_token": oauth_token.token,
|
@@ -26,7 +26,7 @@ def process_inputs(model_id, q_method, email, oauth_token: gr.OAuthToken | None,
|
|
26 |
"quantization_option": q_method,
|
27 |
}
|
28 |
|
29 |
-
response = requests.post(url,
|
30 |
|
31 |
if response.status_code == 200:
|
32 |
processed_inputs[input_hash] = 200
|
|
|
16 |
if input_hash in processed_inputs and processed_inputs[input_hash] == 200:
|
17 |
return "This request has already been submitted successfully. Please do not submit the same request multiple times."
|
18 |
|
19 |
+
url = "https://sdk.nexa4ai.com/task"
|
20 |
|
21 |
+
data = {
|
22 |
"repository_url": f"https://huggingface.co/{model_id}",
|
23 |
"username": profile.username,
|
24 |
"access_token": oauth_token.token,
|
|
|
26 |
"quantization_option": q_method,
|
27 |
}
|
28 |
|
29 |
+
response = requests.post(url, json=data)
|
30 |
|
31 |
if response.status_code == 200:
|
32 |
processed_inputs[input_hash] = 200
|