Spaces:
Running
Running
Update MeAI_Maincode/Detectskindisease.py
Browse files
MeAI_Maincode/Detectskindisease.py
CHANGED
@@ -132,13 +132,12 @@ trans_description = {
|
|
132 |
}
|
133 |
def detect_skin_disease(image, key):
|
134 |
try:
|
135 |
-
#
|
136 |
-
|
137 |
img_byte_array = io.BytesIO()
|
138 |
-
|
139 |
img_byte_array.seek(0)
|
140 |
|
141 |
-
|
142 |
url = "https://detect-skin-disease1.p.rapidapi.com/skin-disease"
|
143 |
files = {"image": ("image.png", img_byte_array, "image/png")}
|
144 |
headers = {
|
@@ -190,8 +189,7 @@ def detect_skin_disease(image, key):
|
|
190 |
|
191 |
|
192 |
|
193 |
-
|
194 |
-
def create_skin_tab(skinkey="b71d1f41camsh51cbf0a2df5facap1b9e25jsn2ce94a61f252"):
|
195 |
css = """
|
196 |
.textboxskin {
|
197 |
font-sxxxxize: 50px; !important;
|
|
|
132 |
}
|
133 |
def detect_skin_disease(image, key):
|
134 |
try:
|
135 |
+
# img = Image.fromarray((image).astype('uint8'))
|
136 |
+
image = Image.open(image)
|
137 |
img_byte_array = io.BytesIO()
|
138 |
+
image.save(img_byte_array, format='PNG')
|
139 |
img_byte_array.seek(0)
|
140 |
|
|
|
141 |
url = "https://detect-skin-disease1.p.rapidapi.com/skin-disease"
|
142 |
files = {"image": ("image.png", img_byte_array, "image/png")}
|
143 |
headers = {
|
|
|
189 |
|
190 |
|
191 |
|
192 |
+
def create_skin_tab(skinkey="a8108953dbmsh2baabfa3db731fdp14177bjsnfebbe465261d"):
|
|
|
193 |
css = """
|
194 |
.textboxskin {
|
195 |
font-sxxxxize: 50px; !important;
|