cfahlgren1 HF staff commited on
Commit
d74feb3
·
1 Parent(s): 3bd2bbe

add sql embed

Browse files
src/routes/+page.svelte CHANGED
@@ -15,18 +15,18 @@
15
  <h1 class="text-5xl mt-10 font-bold text-center tracking-tight text-slate-800 mb-8">{config.title}</h1>
16
  <p class="text-base text-center text-slate-600 mb-8">{config.description}</p>
17
  <ul class="space-y-12">
18
- {#each data.snippets as snippet}
19
- <li class="bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300">
20
- <div class="p-4">
21
- <a href={`${snippet.slug}`} class="block mb-4 hover:underline transition-colors duration-300">
22
- <h2 class="text-2xl font-bold transition-colors duration-300">{snippet.title}</h2>
23
- </a>
24
- <p class="text-sm text-slate-700 font-mono mb-6">{snippet.description}</p>
25
- {#if snippet.code}
26
- <CodeBlock code={snippet.code} language="sql" />
27
- {/if}
28
- </div>
29
- </li>
30
- {/each}
31
- </ul>
32
- </section>
 
15
  <h1 class="text-5xl mt-10 font-bold text-center tracking-tight text-slate-800 mb-8">{config.title}</h1>
16
  <p class="text-base text-center text-slate-600 mb-8">{config.description}</p>
17
  <ul class="space-y-12">
18
+ {#each data.snippets as snippet}
19
+ <li class="bg-whiterounded-lg shadow-md hover:shadow-lg transition-shadow duration-300">
20
+ <div class="p-4">
21
+ <a href={`${snippet.slug}`} class="block mb-4 hover:underline transition-colors duration-300">
22
+ <h2 class="text-2xl font-bold transition-colors duration-300">{snippet.title}</h2>
23
+ </a>
24
+ <p class="text-sm text-slate-700 font-mono mb-6">{snippet.description}</p>
25
+ {#if snippet.code}
26
+ <CodeBlock code={snippet.code} language="sql" />
27
+ {/if}
28
+ </div>
29
+ </li>
30
+ {/each}
31
+ </ul>
32
+ </section>
src/snippets/alpaca_to_chatml.md CHANGED
@@ -75,13 +75,13 @@ Differences between Alpaca and ChatML Conversation Format:
75
  ### `yahma/alpaca-cleaned`
76
 
77
  <iframe
78
- src="https://huggingface.co/datasets/yahma/alpaca-cleaned/embed/viewer/default/train"
79
  frameborder="0"
80
  width="100%"
81
  height="560px"
82
  ></iframe>
83
 
84
- You can run this query through via the `sql_console` in the Hugging Face Hub [here](https://huggingface.co/datasets/yahma/alpaca-cleaned?row=16&sql_console=true&sql=++++--+Convert+Alpaca+format+to+Conversation+format%0A++++WITH+%0A++++source_view+AS+%28%0A++++++SELECT+*+FROM+train++--+Change+%27train%27+to+your+desired+view+name+here%0A++++%29%0A++++SELECT+%0A++++++%5B%0A++++++++struct_pack%28%0A++++++++++%22from%22+%3A%3D+%27user%27%2C%0A++++++++++%22value%22+%3A%3D+CASE+%0A++++++++++++++++++++++WHEN+input+IS+NOT+NULL+AND+input+%21%3D+%27%27+%0A++++++++++++++++++++++THEN+instruction+%7C%7C+%27%5Cn%5Cn%27+%7C%7C+input%0A++++++++++++++++++++++ELSE+instruction%0A++++++++++++++++++++END%0A++++++++%29%2C%0A++++++++struct_pack%28%0A++++++++++%22from%22+%3A%3D+%27assistant%27%2C%0A++++++++++%22value%22+%3A%3D+output%0A++++++++%29%0A++++++%5D+AS+conversation%0A++++FROM+source_view%0A++++WHERE+instruction+IS+NOT+NULL+%0A++++++AND+output+IS+NOT+NULL%3B).
85
 
86
  ![Alpaca to ChatML](./alpaca-to-conversation.png)
87
 
 
75
  ### `yahma/alpaca-cleaned`
76
 
77
  <iframe
78
+ src="https://huggingface.co/datasets/yahma/alpaca-cleaned/embed/viewer/default/train?sql_console=true&sql=--+Convert+Alpaca+format+to+Conversation+format%0AWITH+%0Asource_view+AS+%28%0A++SELECT+*+FROM+train++--+Change+%27train%27+to+your+desired+view+name+here%0A%29%0ASELECT+%0A++%5B%0A++++struct_pack%28%0A++++++%22from%22+%3A%3D+%27user%27%2C%0A++++++%22value%22+%3A%3D+CASE+%0A+++++++++++++++++++WHEN+input+IS+NOT+NULL+AND+input+%21%3D+%27%27+%0A+++++++++++++++++++THEN+instruction+%7C%7C+%27%5Cn%5Cn%27+%7C%7C+input%0A+++++++++++++++++++ELSE+instruction%0A+++++++++++++++++END%0A++++%29%2C%0A++++struct_pack%28%0A++++++%22from%22+%3A%3D+%27assistant%27%2C%0A++++++%22value%22+%3A%3D+output%0A++++%29%0A++%5D+AS+conversation%0AFROM+source_view%0AWHERE+instruction+IS+NOT+NULL+%0A++AND+output+IS+NOT+NULL%3B"
79
  frameborder="0"
80
  width="100%"
81
  height="560px"
82
  ></iframe>
83
 
84
+ You can run this query through via the `sql_console` in the Hugging Face Hub [here](https://huggingface.co/datasets/yahma/alpaca-cleaned/embed/viewer/default/train?sql_console=true&sql=--+Convert+Alpaca+format+to+Conversation+format%0AWITH+%0Asource_view+AS+%28%0A++SELECT+*+FROM+train++--+Change+%27train%27+to+your+desired+view+name+here%0A%29%0ASELECT+%0A++%5B%0A++++struct_pack%28%0A++++++%22from%22+%3A%3D+%27user%27%2C%0A++++++%22value%22+%3A%3D+CASE+%0A+++++++++++++++++++WHEN+input+IS+NOT+NULL+AND+input+%21%3D+%27%27+%0A+++++++++++++++++++THEN+instruction+%7C%7C+%27%5Cn%5Cn%27+%7C%7C+input%0A+++++++++++++++++++ELSE+instruction%0A+++++++++++++++++END%0A++++%29%2C%0A++++struct_pack%28%0A++++++%22from%22+%3A%3D+%27assistant%27%2C%0A++++++%22value%22+%3A%3D+output%0A++++%29%0A++%5D+AS+conversation%0AFROM+source_view%0AWHERE+instruction+IS+NOT+NULL+%0A++AND+output+IS+NOT+NULL%3B).
85
 
86
  ![Alpaca to ChatML](./alpaca-to-conversation.png)
87