dragynir commited on
Commit
85c3ab7
1 Parent(s): 360f5c5

add share arg

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import json
2
  import os
3
 
 
4
  import numpy as np
5
  import torch
6
  import gradio as gr
@@ -110,4 +111,14 @@ with block:
110
  run_button.click(fn=process, inputs=ips, outputs=[generated_output, mask_output])
111
 
112
 
113
- block.launch()
 
 
 
 
 
 
 
 
 
 
 
1
  import json
2
  import os
3
 
4
+ import argparse
5
  import numpy as np
6
  import torch
7
  import gradio as gr
 
111
  run_button.click(fn=process, inputs=ips, outputs=[generated_output, mask_output])
112
 
113
 
114
+ parser = argparse.ArgumentParser()
115
+ parser.add_argument(
116
+ '--share',
117
+ '-s',
118
+ action="store_true",
119
+ default=False,
120
+ help='Create public link for the app.'
121
+ )
122
+ args = parser.parse_args()
123
+
124
+ block.launch(share=args.share)