top001 commited on
Commit
9e83915
·
verified ·
1 Parent(s): 24a36dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -99,5 +99,13 @@ with gr.Blocks(css="style.css") as demo:
99
  api_name="predict",
100
  )
101
 
 
 
 
 
 
 
 
 
102
  if __name__ == "__main__":
103
  demo.queue(max_size=20).launch()
 
99
  api_name="predict",
100
  )
101
 
102
+ demo.add_api_route(
103
+ path="/upload_image",
104
+ methods=["POST"],
105
+ fn=predict,
106
+ inputs=[gr.Image(type="pil"), gr.Slider(value=0.5)],
107
+ outputs=[gr.JSON()],
108
+ )
109
+
110
  if __name__ == "__main__":
111
  demo.queue(max_size=20).launch()