Create goat.py
Browse files- utils/goat.py +14 -0
utils/goat.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import requests
|
3 |
+
import json
|
4 |
+
|
5 |
+
def call_inference(image_file):
|
6 |
+
files = {
|
7 |
+
'media': open(image_file.name, 'rb')
|
8 |
+
}
|
9 |
+
|
10 |
+
response = requests.post(
|
11 |
+
"https://aiwb-sightmodel.web.val.run",
|
12 |
+
files=files
|
13 |
+
)
|
14 |
+
return response.json()
|