Spaces:
Runtime error
Runtime error
Commit
Β·
9f342bb
1
Parent(s):
0b20b6b
localhost 80
Browse files- app.py +3 -0
- apps/data_explorer/data_explorer.py +4 -1
app.py
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
|
|
|
|
|
| 1 |
from apps.data_explorer.data_explorer import main
|
| 2 |
from apps.data_explorer.downloader import download_data
|
| 3 |
|
| 4 |
if __name__ == "__main__":
|
| 5 |
download_data()
|
|
|
|
| 6 |
main()
|
|
|
|
| 1 |
+
import sys
|
| 2 |
+
|
| 3 |
from apps.data_explorer.data_explorer import main
|
| 4 |
from apps.data_explorer.downloader import download_data
|
| 5 |
|
| 6 |
if __name__ == "__main__":
|
| 7 |
download_data()
|
| 8 |
+
sys.argv = [sys.argv[0], "--server-name=localhost", "--server-port=80"]
|
| 9 |
main()
|
apps/data_explorer/data_explorer.py
CHANGED
|
@@ -22,6 +22,9 @@ def parse_arguments():
|
|
| 22 |
help='Default dataset name selected from ZIPs')
|
| 23 |
parser.add_argument('--share', type=bool, default=False,
|
| 24 |
help='Expose the web UI to Gradio')
|
|
|
|
|
|
|
|
|
|
| 25 |
parser.add_argument('--server-port', type=int, default=8080,
|
| 26 |
help='Port ot run the web page on')
|
| 27 |
parser.add_argument('--inbrowser', type=bool, default=False,
|
|
@@ -323,7 +326,7 @@ def main():
|
|
| 323 |
|
| 324 |
blocks.queue(args.concurrency_count) \
|
| 325 |
.launch(share=args.share, inbrowser=args.inbrowser,
|
| 326 |
-
server_name=
|
| 327 |
|
| 328 |
print("Exiting.")
|
| 329 |
|
|
|
|
| 22 |
help='Default dataset name selected from ZIPs')
|
| 23 |
parser.add_argument('--share', type=bool, default=False,
|
| 24 |
help='Expose the web UI to Gradio')
|
| 25 |
+
parser.add_argument(
|
| 26 |
+
'--server-name', type=str, default="0.0.0.0",
|
| 27 |
+
help='localhost for local, 0.0.0.0 (default) for public')
|
| 28 |
parser.add_argument('--server-port', type=int, default=8080,
|
| 29 |
help='Port ot run the web page on')
|
| 30 |
parser.add_argument('--inbrowser', type=bool, default=False,
|
|
|
|
| 326 |
|
| 327 |
blocks.queue(args.concurrency_count) \
|
| 328 |
.launch(share=args.share, inbrowser=args.inbrowser,
|
| 329 |
+
server_name=args.server_name, server_port=args.server_port)
|
| 330 |
|
| 331 |
print("Exiting.")
|
| 332 |
|