Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ from transformers import AutoTokenizer
|
|
4 |
import torch
|
5 |
import os
|
6 |
from transformers import pipeline
|
|
|
7 |
|
8 |
token = AutoTokenizer.from_pretrained('distilroberta-base')
|
9 |
|
@@ -52,7 +53,9 @@ def summary(text):
|
|
52 |
return summ
|
53 |
|
54 |
def classify(vid):
|
55 |
-
|
|
|
|
|
56 |
sum = summary(full_text)[0]['summary_text']
|
57 |
|
58 |
|
|
|
4 |
import torch
|
5 |
import os
|
6 |
from transformers import pipeline
|
7 |
+
import subprocess
|
8 |
|
9 |
token = AutoTokenizer.from_pretrained('distilroberta-base')
|
10 |
|
|
|
53 |
return summ
|
54 |
|
55 |
def classify(vid):
|
56 |
+
filename = vid[:-4]
|
57 |
+
subprocess.call(['ffmpeg','-i',f'{filename}.wav'])
|
58 |
+
full_text = video_identity(f'{filename}.wav')
|
59 |
sum = summary(full_text)[0]['summary_text']
|
60 |
|
61 |
|