Spaces:
Running
on
Zero
Running
on
Zero
Helw150
commited on
Commit
•
3037cd1
1
Parent(s):
38699b4
Some Niceties
Browse files
app.py
CHANGED
@@ -76,9 +76,10 @@ def response(state: AppState, audio: tuple):
|
|
76 |
state.conversation.append(
|
77 |
{"role": "user", "content": {"path": file_name, "mime_type": "audio/wav"}}
|
78 |
)
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
82 |
state.conversation.append(
|
83 |
{
|
84 |
"role": "assistant",
|
@@ -178,7 +179,7 @@ async function main() {
|
|
178 |
console.log("vad loaded") ;
|
179 |
var record = document.querySelector('.record-button');
|
180 |
record.textContent = "Just Start Talking!"
|
181 |
-
record.style = "width:
|
182 |
const myvad = await vad.MicVAD.new({
|
183 |
onSpeechStart: () => {
|
184 |
var record = document.querySelector('.record-button');
|
@@ -209,7 +210,7 @@ js_reset = """
|
|
209 |
() => {
|
210 |
var record = document.querySelector('.record-button');
|
211 |
record.textContent = "Just Start Talking!"
|
212 |
-
record.style = "width:
|
213 |
}
|
214 |
"""
|
215 |
|
|
|
76 |
state.conversation.append(
|
77 |
{"role": "user", "content": {"path": file_name, "mime_type": "audio/wav"}}
|
78 |
)
|
79 |
+
if state.model_outs is None:
|
80 |
+
gr.Warning(
|
81 |
+
"The first response might take a second to generate as DiVA is loaded from Disk to the ZeroGPU!"
|
82 |
+
)
|
83 |
state.conversation.append(
|
84 |
{
|
85 |
"role": "assistant",
|
|
|
179 |
console.log("vad loaded") ;
|
180 |
var record = document.querySelector('.record-button');
|
181 |
record.textContent = "Just Start Talking!"
|
182 |
+
record.style = "width: fit-content; padding-right: 0.5vw;"
|
183 |
const myvad = await vad.MicVAD.new({
|
184 |
onSpeechStart: () => {
|
185 |
var record = document.querySelector('.record-button');
|
|
|
210 |
() => {
|
211 |
var record = document.querySelector('.record-button');
|
212 |
record.textContent = "Just Start Talking!"
|
213 |
+
record.style = "width: fit-content; padding-right: 0.5vw;"
|
214 |
}
|
215 |
"""
|
216 |
|