3v324v23 commited on
Commit
cf373a3
1 Parent(s): cda7b4b
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -9,6 +9,7 @@ import torch
9
  from tqdm import trange
10
  import imageio
11
  import requests
 
12
 
13
  print('load!', flush=True)
14
  checkpoint = 'clevr.pth'
@@ -267,6 +268,10 @@ with gr.Blocks() as demo:
267
 
268
  # btn.click(fn=predict, inputs=num_frames, outputs=gallery, postprocess=False)
269
 
 
 
 
 
270
  demo.queue()
271
- demo.launch(server_name='0.0.0.0', server_port=10093, debug=True, show_error=True)
272
  # demo.launch(server_name='0.0.0.0', server_port=7860, debug=True, show_error=True)
 
9
  from tqdm import trange
10
  import imageio
11
  import requests
12
+ import argparse
13
 
14
  print('load!', flush=True)
15
  checkpoint = 'clevr.pth'
 
268
 
269
  # btn.click(fn=predict, inputs=num_frames, outputs=gallery, postprocess=False)
270
 
271
+ parser = argparse.ArgumentParser()
272
+ parser.add_argument('--port', type=int, help='The port number', default=7860)
273
+ args = parser.parse_args()
274
+
275
  demo.queue()
276
+ demo.launch(server_name='0.0.0.0', server_port=args.port, debug=True, show_error=True)
277
  # demo.launch(server_name='0.0.0.0', server_port=7860, debug=True, show_error=True)