Spaces:
Build error
Build error
BilalSardar
commited on
Commit
•
f5e9a00
1
Parent(s):
46060b5
Update app.py
Browse files
app.py
CHANGED
@@ -37,21 +37,21 @@ warnings.filterwarnings("ignore")
|
|
37 |
# Models #
|
38 |
###############################################
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
###############################################
|
57 |
def Process_audio(fileName):
|
|
|
37 |
# Models #
|
38 |
###############################################
|
39 |
|
40 |
+
summary_model = T5ForConditionalGeneration.from_pretrained('t5-base')
|
41 |
+
summary_tokenizer = T5Tokenizer.from_pretrained('t5-base')
|
42 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
43 |
+
summary_model = summary_model.to(device)
|
44 |
|
45 |
|
46 |
+
glove_file = 'glove.6B.300d.txt'
|
47 |
+
tmp_file = 'word2vec-glove.6B.300d.txt'
|
48 |
+
glove2word2vec(glove_file, tmp_file)
|
49 |
+
model = KeyedVectors.load_word2vec_format(tmp_file)
|
50 |
|
51 |
|
52 |
+
question_model = T5ForConditionalGeneration.from_pretrained('ramsrigouthamg/t5_squad_v1')
|
53 |
+
question_tokenizer = T5Tokenizer.from_pretrained('ramsrigouthamg/t5_squad_v1')
|
54 |
+
question_model = question_model.to(device)
|
55 |
|
56 |
###############################################
|
57 |
def Process_audio(fileName):
|