Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
b6de3f2
1
Parent(s):
0fa20f6
modify main function
Browse files
app.py
CHANGED
|
@@ -531,17 +531,16 @@ def build_demo(embed_mode, cur_dir=None):
|
|
| 531 |
return demo
|
| 532 |
|
| 533 |
|
| 534 |
-
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
)
|
|
|
|
| 531 |
return demo
|
| 532 |
|
| 533 |
|
| 534 |
+
parser = argparse.ArgumentParser()
|
| 535 |
+
parser.add_argument("--share", action="store_true")
|
| 536 |
+
parser.add_argument("--embed", action="store_true")
|
| 537 |
+
args = parser.parse_args()
|
| 538 |
+
|
| 539 |
+
demo = build_demo(args.embed)
|
| 540 |
+
demo.queue(
|
| 541 |
+
api_open=False
|
| 542 |
+
).launch(
|
| 543 |
+
favicon_path="./examples/icon_256.png",
|
| 544 |
+
allowed_paths=["/"],
|
| 545 |
+
share=args.share
|
| 546 |
+
)
|
|
|