Spaces:
Runtime error
Runtime error
Jyothish CHANDRASENAN
commited on
Commit
·
db7fdcd
1
Parent(s):
93bb832
Update app.py
Browse files
app.py
CHANGED
@@ -144,9 +144,9 @@ def infer(preprocessed):
|
|
144 |
return prediction
|
145 |
|
146 |
|
147 |
-
def predict(
|
148 |
|
149 |
-
raw_img = cv2.imread(
|
150 |
# preprocess
|
151 |
preprocessed_img, orig_img = preprocessor(raw_img)
|
152 |
# infer
|
@@ -159,4 +159,5 @@ gr.Interface(fn=predict,
|
|
159 |
inputs=[gr.Image()],
|
160 |
outputs="image",
|
161 |
css="footer {visibility: hidden} body}, .gradio-container {background-color: white}",
|
|
|
162 |
examples=["001.png","002.png","003.png","004.png","005.png"]).launch(share=False)
|
|
|
144 |
return prediction
|
145 |
|
146 |
|
147 |
+
def predict(img):
|
148 |
|
149 |
+
raw_img = cv2.imread(img)
|
150 |
# preprocess
|
151 |
preprocessed_img, orig_img = preprocessor(raw_img)
|
152 |
# infer
|
|
|
159 |
inputs=[gr.Image()],
|
160 |
outputs="image",
|
161 |
css="footer {visibility: hidden} body}, .gradio-container {background-color: white}",
|
162 |
+
title="Automi Demo",
|
163 |
examples=["001.png","002.png","003.png","004.png","005.png"]).launch(share=False)
|