Spaces:
Runtime error
Runtime error
NeonBohdan
commited on
Commit
•
2e517b5
1
Parent(s):
4fe68bc
Extend input_personas
Browse files
shared.py
CHANGED
@@ -38,9 +38,10 @@ class ModelConfig(BaseModel):
|
|
38 |
|
39 |
|
40 |
class Client:
|
41 |
-
def __init__(self, api_url, api_key):
|
42 |
self.api_url = api_url
|
43 |
self.api_key = api_key
|
|
|
44 |
|
45 |
self.init_all()
|
46 |
|
@@ -72,8 +73,9 @@ class Client:
|
|
72 |
subfolder="datasets",
|
73 |
revision=self.revision)
|
74 |
self.config = ModelConfig.from_yaml(config_path)
|
75 |
-
|
76 |
except EntryNotFoundError:
|
77 |
-
|
78 |
|
79 |
-
|
|
|
|
38 |
|
39 |
|
40 |
class Client:
|
41 |
+
def __init__(self, api_url, api_key, personas):
|
42 |
self.api_url = api_url
|
43 |
self.api_key = api_key
|
44 |
+
self.input_personas = personas
|
45 |
|
46 |
self.init_all()
|
47 |
|
|
|
73 |
subfolder="datasets",
|
74 |
revision=self.revision)
|
75 |
self.config = ModelConfig.from_yaml(config_path)
|
76 |
+
personas = self.config.pile.persona2system
|
77 |
except EntryNotFoundError:
|
78 |
+
personas = {}
|
79 |
|
80 |
+
personas["default"] = None
|
81 |
+
self.personas = self.input_personas | personas
|