sayakpaul HF staff commited on
Commit
329f9c0
1 Parent(s): 80fa96c
Files changed (1) hide show
  1. main.py +11 -6
main.py CHANGED
@@ -16,10 +16,15 @@ def predict(inp):
16
  return confidences
17
 
18
 
19
- demo = gr.Interface(
20
- fn=predict,
21
- inputs=gr.inputs.Image(type="pil"),
22
- outputs=gr.outputs.Label(num_top_classes=3),
23
- )
 
24
 
25
- demo.launch()
 
 
 
 
 
16
  return confidences
17
 
18
 
19
+ def run():
20
+ demo = gr.Interface(
21
+ fn=predict,
22
+ inputs=gr.inputs.Image(type="pil"),
23
+ outputs=gr.outputs.Label(num_top_classes=3),
24
+ )
25
 
26
+ demo.launch(server_name="0.0.0.0", server_port=7860)
27
+
28
+
29
+ if __name__ == "__main__":
30
+ run()