Spaces:
Runtime error
Runtime error
ryanzhangfan
commited on
Commit
•
c978e22
1
Parent(s):
ce50c4e
fix new version of gradio
Browse files
app.py
CHANGED
@@ -6,14 +6,13 @@
|
|
6 |
# Email : [email protected]
|
7 |
# Institute : Beijing Academy of Artificial Intelligence (BAAI)
|
8 |
# Create On : 2023-12-11 15:34
|
9 |
-
# Last Modified : 2023-12-20 04:
|
10 |
# File Name : app.py
|
11 |
# Description :
|
12 |
#
|
13 |
# ===================================================
|
14 |
|
15 |
import argparse
|
16 |
-
import os
|
17 |
|
18 |
import gradio as gr
|
19 |
from demo.generation_frontend import build_generation
|
@@ -26,7 +25,7 @@ parser.add_argument("--host", type=str, default="0.0.0.0")
|
|
26 |
parser.add_argument("--port", type=int, default=9002)
|
27 |
parser.add_argument("--share", action="store_true")
|
28 |
parser.add_argument("--controller-url", type=str, default="http://218.91.113.230:9002")
|
29 |
-
parser.add_argument("--concurrency-count", type=int, default=
|
30 |
parser.add_argument("--disable-chat", action="store_true")
|
31 |
parser.add_argument("--disable-generate", action="store_true")
|
32 |
|
@@ -55,9 +54,10 @@ if __name__ == "__main__":
|
|
55 |
)
|
56 |
|
57 |
demo_all.queue(
|
58 |
-
|
59 |
status_update_rate=3,
|
60 |
api_open=False,
|
|
|
61 |
).launch(
|
62 |
enable_queue=True,
|
63 |
server_name=args.host, server_port=args.port,
|
|
|
6 |
# Email : [email protected]
|
7 |
# Institute : Beijing Academy of Artificial Intelligence (BAAI)
|
8 |
# Create On : 2023-12-11 15:34
|
9 |
+
# Last Modified : 2023-12-20 04:36
|
10 |
# File Name : app.py
|
11 |
# Description :
|
12 |
#
|
13 |
# ===================================================
|
14 |
|
15 |
import argparse
|
|
|
16 |
|
17 |
import gradio as gr
|
18 |
from demo.generation_frontend import build_generation
|
|
|
25 |
parser.add_argument("--port", type=int, default=9002)
|
26 |
parser.add_argument("--share", action="store_true")
|
27 |
parser.add_argument("--controller-url", type=str, default="http://218.91.113.230:9002")
|
28 |
+
parser.add_argument("--concurrency-count", type=int, default=2)
|
29 |
parser.add_argument("--disable-chat", action="store_true")
|
30 |
parser.add_argument("--disable-generate", action="store_true")
|
31 |
|
|
|
54 |
)
|
55 |
|
56 |
demo_all.queue(
|
57 |
+
max_size=20,
|
58 |
status_update_rate=3,
|
59 |
api_open=False,
|
60 |
+
default_concurrency_limit=args.concurrency_count,
|
61 |
).launch(
|
62 |
enable_queue=True,
|
63 |
server_name=args.host, server_port=args.port,
|