Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,17 +2,25 @@ from funasr import AutoModel
|
|
2 |
from funasr.utils.postprocess_utils import rich_transcription_postprocess
|
3 |
from modelscope import snapshot_download
|
4 |
|
|
|
|
|
5 |
import io
|
6 |
import os
|
7 |
import tempfile
|
8 |
import json
|
9 |
from typing import Optional
|
10 |
|
|
|
|
|
|
|
11 |
import torch
|
12 |
import gradio as gr
|
13 |
|
14 |
from config import model_config
|
15 |
|
|
|
|
|
|
|
16 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
17 |
model_dir = snapshot_download(model_config['model_dir'])
|
18 |
|
|
|
2 |
from funasr.utils.postprocess_utils import rich_transcription_postprocess
|
3 |
from modelscope import snapshot_download
|
4 |
|
5 |
+
import datetime
|
6 |
+
import math
|
7 |
import io
|
8 |
import os
|
9 |
import tempfile
|
10 |
import json
|
11 |
from typing import Optional
|
12 |
|
13 |
+
from pyannote.audio import Audio, Pipeline
|
14 |
+
from pyannote.core import Segment
|
15 |
+
|
16 |
import torch
|
17 |
import gradio as gr
|
18 |
|
19 |
from config import model_config
|
20 |
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
25 |
model_dir = snapshot_download(model_config['model_dir'])
|
26 |
|