mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 00:18:20 +01:00
6c16e4cecf
Credits: https://github.com/oobabooga/text-generation-webui/issues/1524#issuecomment-1698255209
14 lines
466 B
Python
14 lines
466 B
Python
import time
|
|
|
|
import extensions.api.blocking_api as blocking_api
|
|
import extensions.api.streaming_api as streaming_api
|
|
from modules import shared
|
|
|
|
|
|
def setup():
|
|
blocking_api.start_server(shared.args.api_blocking_port, share=shared.args.public_api, tunnel_id=shared.args.public_api_id)
|
|
if shared.public_api:
|
|
time.sleep(5)
|
|
|
|
streaming_api.start_server(shared.args.api_streaming_port, share=shared.args.public_api, tunnel_id=shared.args.public_api_id)
|