mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 09:59:22 +08:00
Add Method for loading community Vad Models (#136)
* Add code * add code
This commit is contained in:
60
docs/vad_gallery.md
Normal file
60
docs/vad_gallery.md
Normal file
@@ -0,0 +1,60 @@
|
||||
<style>
|
||||
.tag-button {
|
||||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.tag-button > code {
|
||||
color: var(--supernova);
|
||||
}
|
||||
|
||||
.tag-button.active {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
A collection of VAD models ready to use with FastRTC. Click on the tags below to find the VAD model you're looking for!
|
||||
|
||||
|
||||
<div class="tag-buttons">
|
||||
<button class="tag-button" data-tag="pytorch"><code>pytorch</code></button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function filterCards() {
|
||||
const activeButtons = document.querySelectorAll('.tag-button.active');
|
||||
const selectedTags = Array.from(activeButtons).map(button => button.getAttribute('data-tag'));
|
||||
const cards = document.querySelectorAll('.grid.cards > ul > li > p[data-tags]');
|
||||
|
||||
cards.forEach(card => {
|
||||
const cardTags = card.getAttribute('data-tags').split(',');
|
||||
const shouldShow = selectedTags.length === 0 || selectedTags.some(tag => cardTags.includes(tag));
|
||||
card.parentElement.style.display = shouldShow ? 'block' : 'none';
|
||||
});
|
||||
}
|
||||
document.querySelectorAll('.tag-button').forEach(button => {
|
||||
button.addEventListener('click', () => {
|
||||
button.classList.toggle('active');
|
||||
filterCards();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :speaking_head:{ .lg .middle }:eyes:{ .lg .middle } __Your VAD Model__
|
||||
{: data-tags="pytorch"}
|
||||
|
||||
---
|
||||
|
||||
Description
|
||||
|
||||
Install Instructions
|
||||
|
||||
Usage
|
||||
|
||||
[:octicons-arrow-right-24: Demo](Your demo here)
|
||||
|
||||
[:octicons-code-16: Repository](Code here)
|
||||
Reference in New Issue
Block a user