Skip to content

Commit

Permalink
Update the home page
Browse files Browse the repository at this point in the history
  • Loading branch information
rlouf committed Dec 6, 2023
1 parent be92549 commit 742ebb6
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 204 deletions.
2 changes: 1 addition & 1 deletion docs/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pip install outlines
"weapon": "mace",
"strength": 4171
}
`````
```

## Acknowledgements

Expand Down
49 changes: 48 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,51 @@
---
title: Outlines
template: home.html
hide:
- navigation
- toc
- feedback
---

#

<figure markdown>
![Image title](assets/images/logo.png){ width="300" }
</figure>

<center>
<h1 class="title">Generate text with LLMs</h1>
<h2 class="subtitle">Robust prompting & (guided) text generation</h2>
[:fontawesome-solid-bolt: Get started](get_started.md){ .md-button .md-button--primary }
[:fontawesome-solid-code-pull-request: Contribute](https://github.com/outlines-dev/outlines){ .md-button }

<div class="index-pre-code">
```python
from enum import Enum
from pydantic import BaseModel, constr

import outlines.models as models
import outlines.text.generate as generate


class Armor(str, Enum):
leather = "leather"
chainmail = "chainmail"
plate = "plate"


class Character(BaseModel):
name: constr(max_length=10)
age: int
armor: Armor
strength: int


model = models.transformers("mistralai/Mistral-7B-v0.1", device="cuda")
generator = generate.json(model, Character, max_tokens=100)
sequence = generator("Give me a character description")
```
</div>

<a class="github-button" href="https://github.com/outlines-dev/outlines" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star outlines-dev/outlines on GitHub">Star</a>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</center>
202 changes: 0 additions & 202 deletions docs/overrides/home.html

This file was deleted.

32 changes: 32 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,35 @@
code > * {
border-radius: 1rem;
}

.index-pre-code {
margin: 50px;
width: 60%;
left: 50%;
}

.index-pre-code pre>code {
text-align: left;
}

h1.title {
color: #FFFFFF;
margin: 0px 0px 5px;
}

h2.subtitle {
margin: 5px 0px 25px;
}

.md-typeset {
line-height: 21px;
font-weight: 400;
}

.md-typeset h1 {
font-weight: bold;
}

.md-typeset h2 {
font-weight: bold;
}

0 comments on commit 742ebb6

Please sign in to comment.