sayedM commited on
Commit
8790d1f
·
1 Parent(s): 2b1561b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -41,11 +41,11 @@ def get_results(image, prompt,segment):
41
  task_="0"
42
  if segment == "Segmentation":
43
  task_="1"
44
- payload = {
45
  "base64str": base64str,
46
  "classes": prompt,
47
- "segment": task_ # 1 if checkbox is selected, 0 if not
48
- }
49
  # Send the request to the API
50
  response = requests.put(api_key, data=payload)
51
 
 
41
  task_="0"
42
  if segment == "Segmentation":
43
  task_="1"
44
+ payload =json.dumps({
45
  "base64str": base64str,
46
  "classes": prompt,
47
+ "segment": task_ })
48
+ # Prepare the payload (Adjust this part according to the API requirements)
49
  # Send the request to the API
50
  response = requests.put(api_key, data=payload)
51