feat: add demo change port support
Browse files
demo.py
CHANGED
@@ -50,6 +50,13 @@ parser.add_argument(
|
|
50 |
action="store_true",
|
51 |
help="Get public link via Gradio (default: False)",
|
52 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
args = parser.parse_args()
|
55 |
|
@@ -185,4 +192,4 @@ with gr.Blocks() as demo:
|
|
185 |
)
|
186 |
|
187 |
|
188 |
-
demo.launch(share=args.share)
|
|
|
50 |
action="store_true",
|
51 |
help="Get public link via Gradio (default: False)",
|
52 |
)
|
53 |
+
parser.add_argument(
|
54 |
+
"-p",
|
55 |
+
"--port",
|
56 |
+
type=int,
|
57 |
+
default=7860,
|
58 |
+
help="Port to use for Gradio (default: 7860)",
|
59 |
+
)
|
60 |
|
61 |
args = parser.parse_args()
|
62 |
|
|
|
192 |
)
|
193 |
|
194 |
|
195 |
+
demo.launch(share=args.share, server_port=args.port)
|