Synced repo using 'sync_with_huggingface' Github Action
Browse files- config.yaml +1 -1
- src/app/app.py +1 -0
- src/app/config.py +2 -2
config.yaml
CHANGED
@@ -5,4 +5,4 @@ max_seq_len: 300
|
|
5 |
server:
|
6 |
local: true
|
7 |
host: "0.0.0.0"
|
8 |
-
port:
|
|
|
5 |
server:
|
6 |
local: true
|
7 |
host: "0.0.0.0"
|
8 |
+
port: 7861
|
src/app/app.py
CHANGED
@@ -94,6 +94,7 @@ class App:
|
|
94 |
|
95 |
if self.config.local:
|
96 |
interface.launch(
|
|
|
97 |
server_name=self.config.host,
|
98 |
server_port=self.config.port
|
99 |
)
|
|
|
94 |
|
95 |
if self.config.local:
|
96 |
interface.launch(
|
97 |
+
share=False,
|
98 |
server_name=self.config.host,
|
99 |
server_port=self.config.port
|
100 |
)
|
src/app/config.py
CHANGED
@@ -11,7 +11,7 @@ class AppConfig:
|
|
11 |
max_seq_len: int = 300
|
12 |
local: bool = True
|
13 |
host: str = "0.0.0.0"
|
14 |
-
port: int =
|
15 |
|
16 |
@classmethod
|
17 |
def from_yaml(cls, config_path: str) -> 'AppConfig':
|
@@ -35,5 +35,5 @@ class AppConfig:
|
|
35 |
max_seq_len=int(config_data['max_seq_len']),
|
36 |
local=config_data.get('server', {}).get('local', True),
|
37 |
host=config_data.get('server', {}).get('host', "0.0.0.0"),
|
38 |
-
port=config_data.get('server', {}).get('port',
|
39 |
)
|
|
|
11 |
max_seq_len: int = 300
|
12 |
local: bool = True
|
13 |
host: str = "0.0.0.0"
|
14 |
+
port: int = 7861
|
15 |
|
16 |
@classmethod
|
17 |
def from_yaml(cls, config_path: str) -> 'AppConfig':
|
|
|
35 |
max_seq_len=int(config_data['max_seq_len']),
|
36 |
local=config_data.get('server', {}).get('local', True),
|
37 |
host=config_data.get('server', {}).get('host', "0.0.0.0"),
|
38 |
+
port=config_data.get('server', {}).get('port', 7861)
|
39 |
)
|