gordon-posit commited on
Commit
f9e2cf5
1 Parent(s): 6354197

Update template

Browse files
Files changed (2) hide show
  1. src/_quarto.yml +23 -15
  2. src/index.qmd +45 -11
src/_quarto.yml CHANGED
@@ -1,29 +1,37 @@
1
  project:
2
  type: website
3
-
4
  website:
5
  title: "Open-Source AI Cookbook"
6
  sidebar:
7
  style: "docked"
8
  search: true
 
9
  contents:
10
- - href: index.qmd
11
- text: About
12
- - section: RAG
13
  contents:
14
- - notebooks/rag_zephyr_langchain.qmd
15
- - notebooks/advanced_rag.qmd
16
- - notebooks/rag_evaluation.qmd
17
- - notebooks/automatic_embedding.ipynb
18
- - notebooks/faiss.ipynb
19
- - notebooks/single_gpu.ipynb
20
-
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  format:
23
  html:
24
  theme: cosmo
25
  css: styles.css
26
- toc: true
27
-
28
-
29
-
 
1
  project:
2
  type: website
 
3
  website:
4
  title: "Open-Source AI Cookbook"
5
  sidebar:
6
  style: "docked"
7
  search: true
8
+ collapse-level: 3
9
  contents:
10
+ - section: "About"
 
 
11
  contents:
12
+ - href: index.qmd
13
+ text: About Quarto
14
+ - section: "Open-Source AI Cookbook"
15
+ contents:
16
+ - section: "RAG Techniques"
17
+ contents:
18
+ - href: notebooks/rag_zephyr_langchain.qmd
19
+ text: "RAG Zephyr & LangChain"
20
+ - href: notebooks/advanced_rag.qmd
21
+ text: "Advanced RAG"
22
+ - href: notebooks/rag_evaluation.qmd
23
+ text: "RAG Evaluation"
24
+ - section: "Additional Techniques"
25
+ contents:
26
+ - href: notebooks/automatic_embedding.ipynb
27
+ text: "Automatic Embedding"
28
+ - href: notebooks/faiss.ipynb
29
+ text: "FAISS for Efficient Search"
30
+ - href: notebooks/single_gpu.ipynb
31
+ text: "Single GPU Optimization"
32
 
33
  format:
34
  html:
35
  theme: cosmo
36
  css: styles.css
37
+ toc: true
 
 
 
src/index.qmd CHANGED
@@ -1,19 +1,41 @@
1
  ---
2
- title: "Open Source Cookbook"
3
  ---
4
 
5
- This is a Quarto implementation of [the Open-Source AI Cookbook](https://github.com/huggingface/cookbook),
6
- which is a collection of notebooks illustrating practical aspects of building AI
7
- applications and solving various machine learning tasks using open-source tools and models.
8
-
9
- # About Quarto
10
- [Quarto](https://quarto.org/) is a Markdown-based documentation system which lets you write documents in Markdown or Jupyter Notebooks, and render them to a variety of formats including HTML, PDF, Powerpoint, and more.
11
  You can also use Quarto to write [books](https://quarto.org/docs/books/), create [dashboards](https://quarto.org/docs/dashboards/), and embed web applications with [Observable](https://quarto.org/docs/interactive/ojs/) and [Shinylive](https://quarto.org/docs/blog/posts/2022-10-25-shinylive-extension/).
12
 
13
- ## Executing code
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  One of the main virtues of Quarto is that it lets you combine code and text in a single document.
16
- By default if you include a code chunk in your document, Quarto will execute that code and include the output in the rendered document.
17
  This is great for reproducibility and for creating documents that are always up-to-date.
18
  For example you can include code which generates a plot like this:
19
 
@@ -32,6 +54,18 @@ plt.title("Tip by Total Bill")
32
  plt.show()
33
  ```
34
 
 
 
35
  You can also include [inline code](https://quarto.org/docs/computations/inline-code.html) to insert computed values into text.
36
- For example we can reference the `tips` data frame which was defined in the preceding code block by wrapping it in ``{python} tips['tip'].max()``.
37
- You can control [code execution](https://quarto.org/docs/computations/execution-options.html), or [freeze code output](https://quarto.org/docs/projects/code-execution.html#freeze) to capture the output of long running computations.
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: "About Quarto"
3
  ---
4
 
5
+ [Quarto](https://quarto.org/) is a Markdown-based documentation system that lets you write documents in Markdown or Jupyter Notebooks, and render them to a variety of formats including HTML, PDF, PowerPoint, and more.
 
 
 
 
 
6
  You can also use Quarto to write [books](https://quarto.org/docs/books/), create [dashboards](https://quarto.org/docs/dashboards/), and embed web applications with [Observable](https://quarto.org/docs/interactive/ojs/) and [Shinylive](https://quarto.org/docs/blog/posts/2022-10-25-shinylive-extension/).
7
 
8
+ ## Getting started with Quarto
9
+
10
+ Once you've created the space, click on the `Files` tab in the top right to take a look at the files which make up this Space.
11
+ There are a couple of important files which you should pay attention to:
12
+
13
+ - `Dockerfile`: This contains the system setup to build and serve the Quarto site on Hugging Face. You probably won't need to change this file that
14
+ often unless you need to add additional system dependencies or modify the Quarto version.
15
+ - `requirements.txt`: This is where you should include any Python dependencies which you need for your website.
16
+ These are installed when the Dockerfile builds.
17
+ - The `src` directory contains the source files for the Quarto website. You can include Jupyter notebooks or markdown (`.qmd` or `.md`) files.
18
+ - `src/_quarto.yml` defines the navigation for your website. If you want to add new pages or reorganize the existing ones, you'll need to change this file.
19
+
20
+
21
+ ## Recommended Workflow
22
+
23
+ 1. **Clone the space locally**
24
+ 2. **Install Quarto**: In order to render your Quarto site without Docker, we recommend installing Quarto by following the instructions on the [official Quarto website](https://quarto.org/docs/get-started/).
25
+ 3. **Install Quarto VS Code extension**: The [Quarto VS Code Extension](https://quarto.org/docs/tools/vscode.html) includes a number of productivity tools including YAML Autocomplete, a preview button, and a visual editor. Quarto works great with VS Code, but the extension does make it easier to get the most out of Quarto.
26
+ 4. **Edit the site**: The website files are contained in the `src` directory, and the site navigation is defined in `src/_quarto.yml`. Try editing these files and either clicking the "Preview" button in VS Code, or calling `quarto preview src` from the command line.
27
+ 5. **Learn more about Quarto**: You can do a lot of things with Quarto, and they are all documented on the [Quarto Website](https://quarto.org/guide/). In particular, you may be interested in:
28
+
29
+ - All about building [websites](https://quarto.org/docs/websites/)
30
+ - Building Static [Dashboards](https://quarto.org/docs/dashboards/)
31
+ - How to write [books](https://quarto.org/docs/books/index.html) and [manuscripts](https://quarto.org/docs/manuscripts/)
32
+ - Reproducible [presentations](https://quarto.org/docs/presentations/)
33
+ - Including [Observable](https://quarto.org/docs/interactive/ojs/) or [Shiny](https://quarto.org/docs/interactive/shiny/) applications in your Quarto site
34
+
35
+ ## Code Execution
36
 
37
  One of the main virtues of Quarto is that it lets you combine code and text in a single document.
38
+ By default, if you include a code chunk in your document, Quarto will execute that code and include the output in the rendered document.
39
  This is great for reproducibility and for creating documents that are always up-to-date.
40
  For example you can include code which generates a plot like this:
41
 
 
54
  plt.show()
55
  ```
56
 
57
+ When the website is built the Python code will run and the output will be included in the document.
58
+
59
  You can also include [inline code](https://quarto.org/docs/computations/inline-code.html) to insert computed values into text.
60
+ For example we can include the maximum tip value in the `tips` data frame like this: ``{python} tips['tip'].max()``.
61
+ You can control [code execution](https://quarto.org/docs/computations/execution-options.html), or [freeze code output](https://quarto.org/docs/projects/code-execution.html#freeze) to capture the output of long running computations.
62
+
63
+
64
+ ## About the Open Source AI Cookbook
65
+
66
+ To provide a realistic example of how Quarto can help you organize long-form documentation,
67
+ we've implemented the Hugging Face [Open-Source AI Cookbook](https://github.com/huggingface/cookbook) in Quarto.
68
+ The Open-Source AI Cookbook is a collection of notebooks illustrating practical aspects of building AI applications and solving various machine learning tasks using open-source tools and models.
69
+ You can read more about it, or contribute your own Notebook on the [Github Repo](https://github.com/huggingface/cookbook)
70
+
71
+