diff --git a/examples/cerebrium/cerebrium.toml b/examples/cerebrium/cerebrium.toml index 56f525d85..f7b9fb1ed 100644 --- a/examples/cerebrium/cerebrium.toml +++ b/examples/cerebrium/cerebrium.toml @@ -24,4 +24,3 @@ outline = "==0.0.37" transformers = "==4.38.2" datasets = "==2.18.0" accelerate = "==0.27.2" - diff --git a/examples/cerebrium/main.py b/examples/cerebrium/main.py index 0b9bf6c49..db244adf2 100644 --- a/examples/cerebrium/main.py +++ b/examples/cerebrium/main.py @@ -7,21 +7,11 @@ "title": "Character", "type": "object", "properties": { - "name": { - "title": "Name", - "maxLength": 10, - "type": "string" - }, - "age": { - "title": "Age", - "type": "integer" - }, + "name": {"title": "Name", "maxLength": 10, "type": "string"}, + "age": {"title": "Age", "type": "integer"}, "armor": {"$ref": "#/definitions/Armor"}, "weapon": {"$ref": "#/definitions/Weapon"}, - "strength": { - "title": "Strength", - "type": "integer" - } + "strength": {"title": "Strength", "type": "integer"}, }, "required": ["name", "age", "armor", "weapon", "strength"], "definitions": { @@ -29,24 +19,24 @@ "title": "Armor", "description": "An enumeration.", "enum": ["leather", "chainmail", "plate"], - "type": "string" + "type": "string", }, "Weapon": { "title": "Weapon", "description": "An enumeration.", "enum": ["sword", "axe", "mace", "spear", "bow", "crossbow"], - "type": "string" - } - } + "type": "string", + }, + }, } + def generate( prompt: str = "Amiri, a 53 year old warrior woman with a sword and leather armor.", ): - character = generator( f"[INST]Give me a character description. Describe {prompt}.[/INST]" ) print(character) - return character \ No newline at end of file + return character