yuragoithf
commited on
Commit
·
5e904fc
1
Parent(s):
cee0954
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import requests
|
2 |
-
import os
|
3 |
import gradio as gr
|
4 |
# from PIL import Image
|
5 |
|
@@ -16,7 +16,8 @@ def query(filename):
|
|
16 |
return response.json()
|
17 |
|
18 |
def rb(img):
|
19 |
-
response = requests.post(API_URL, headers=headers, data=bytes(img.tobytes("
|
|
|
20 |
return response.json()
|
21 |
|
22 |
# train = os.listdir("./")
|
|
|
1 |
import requests
|
2 |
+
import os, io
|
3 |
import gradio as gr
|
4 |
# from PIL import Image
|
5 |
|
|
|
16 |
return response.json()
|
17 |
|
18 |
def rb(img):
|
19 |
+
# response = requests.post(API_URL, headers=headers, data=bytes(img.tobytes("raw")))
|
20 |
+
response = requests.post(API_URL, headers=headers, data=io.BytesIO(img))
|
21 |
return response.json()
|
22 |
|
23 |
# train = os.listdir("./")
|