Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ def predict(image):
|
|
| 29 |
if label in class_ok : result = "์ธ์ฆ์ด ์๋ฃ๋์์ต๋๋ค. (+1p)"
|
| 30 |
else : result = "์ธ์ฆ์ ์คํจํ์ต๋๋ค. (-)"
|
| 31 |
# ์์ธก ๊ฒฐ๊ณผ์ ์๋ณธ ์ถ๋ ฅ๊ฐ์ ๋ชจ๋ ๋ฐํ
|
| 32 |
-
return result
|
| 33 |
|
| 34 |
# Gradio ์ธํฐํ์ด์ค ์ค์ (๋ ๊ฐ์ ์ถ๋ ฅ)
|
| 35 |
iface = gr.Interface(fn=predict, inputs=gr.Image(type='pil'), outputs=['label'], live=True)
|
|
|
|
| 29 |
if label in class_ok : result = "์ธ์ฆ์ด ์๋ฃ๋์์ต๋๋ค. (+1p)"
|
| 30 |
else : result = "์ธ์ฆ์ ์คํจํ์ต๋๋ค. (-)"
|
| 31 |
# ์์ธก ๊ฒฐ๊ณผ์ ์๋ณธ ์ถ๋ ฅ๊ฐ์ ๋ชจ๋ ๋ฐํ
|
| 32 |
+
return result # ์๋ณธ ์ถ๋ ฅ๊ฐ์ NumPy ๋ฐฐ์ด๋ก ๋ณํํ์ฌ ๋ฐํ
|
| 33 |
|
| 34 |
# Gradio ์ธํฐํ์ด์ค ์ค์ (๋ ๊ฐ์ ์ถ๋ ฅ)
|
| 35 |
iface = gr.Interface(fn=predict, inputs=gr.Image(type='pil'), outputs=['label'], live=True)
|