Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,7 @@ import os
|
|
| 14 |
import io
|
| 15 |
from pydub import AudioSegment
|
| 16 |
from dataclasses import dataclass
|
|
|
|
| 17 |
|
| 18 |
# Define AppState dataclass for managing the application's state
|
| 19 |
@dataclass
|
|
@@ -61,7 +62,7 @@ pipe_asr = pipeline(
|
|
| 61 |
return_timestamps=True
|
| 62 |
)
|
| 63 |
|
| 64 |
-
# Function to reset the state after
|
| 65 |
def auto_reset_state():
|
| 66 |
time.sleep(2)
|
| 67 |
return AppState() # Reset the state
|
|
|
|
| 14 |
import io
|
| 15 |
from pydub import AudioSegment
|
| 16 |
from dataclasses import dataclass
|
| 17 |
+
from utils import determine_pause
|
| 18 |
|
| 19 |
# Define AppState dataclass for managing the application's state
|
| 20 |
@dataclass
|
|
|
|
| 62 |
return_timestamps=True
|
| 63 |
)
|
| 64 |
|
| 65 |
+
# Function to reset the state after 2 seconds
|
| 66 |
def auto_reset_state():
|
| 67 |
time.sleep(2)
|
| 68 |
return AppState() # Reset the state
|