mamechin commited on
Commit
4809d91
1 Parent(s): 522e4e9

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
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
- gr.Interface(inputs=["image"],outputs=["image"],fn=lambda img:model(img).render()[0]).launch()
 
 
 
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()