qiqiWav commited on
Commit
c20511b
1 Parent(s): 3d32c38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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/task"
20
 
21
- data = {
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, json=data)
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