Skip to content

Commit

Permalink
Fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
milo157 committed Jun 12, 2024
1 parent 7724d92 commit c1587f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
1 change: 0 additions & 1 deletion examples/cerebrium/cerebrium.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ outline = "==0.0.37"
transformers = "==4.38.2"
datasets = "==2.18.0"
accelerate = "==0.27.2"

28 changes: 9 additions & 19 deletions examples/cerebrium/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,36 @@
"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": {
"Armor": {
"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"<s>[INST]Give me a character description. Describe {prompt}.[/INST]"
)

print(character)
return character
return character

0 comments on commit c1587f7

Please sign in to comment.