Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,17 +16,17 @@ 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 = "https://sdk.nexa4ai.com/
|
20 |
|
21 |
-
|
22 |
-
"repository_url": model_id,
|
23 |
"username": profile.username,
|
24 |
"access_token": oauth_token.token,
|
25 |
"email": email,
|
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/convert--to--gguf"
|
20 |
|
21 |
+
params = {
|
22 |
+
"repository_url": f"https://huggingface.co/{model_id}",
|
23 |
"username": profile.username,
|
24 |
"access_token": oauth_token.token,
|
25 |
"email": email,
|
26 |
"quantization_option": q_method,
|
27 |
}
|
28 |
|
29 |
+
response = requests.post(url, params=params)
|
30 |
|
31 |
if response.status_code == 200:
|
32 |
processed_inputs[input_hash] = 200
|