Spaces:
Runtime error
Runtime error
add share arg
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|