Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,19 @@ import gradio as gr
|
|
13 |
# results = model(imgs) # batched inference
|
14 |
# results.print()
|
15 |
# results.save()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
|
|
|
|
|
|
17 |
|
18 |
|
19 |
-
|
|
|
|
|
|
13 |
# results = model(imgs) # batched inference
|
14 |
# results.print()
|
15 |
# results.save()
|
16 |
+
def predict(input_image):
|
17 |
+
"""
|
18 |
+
Predict model output
|
19 |
+
"""
|
20 |
+
results = model(input_image)
|
21 |
+
output_image = results.render()[0]
|
22 |
+
price = "0"
|
23 |
|
24 |
+
# Return the output image and price
|
25 |
+
return [output_image, price]
|
26 |
+
# return [input_image, price]
|
27 |
|
28 |
|
29 |
+
|
30 |
+
# gr.Interface(inputs=["image"],outputs=["image"],fn=lambda img:model(img).render()[0]).launch()
|
31 |
+
gr.Interface(inputs=["image"], outputs=["image", "text"], fn=predict).launch()
|