added gitignore
Browse files- .gitignore +1 -0
- test.ipynb +89 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Data
|
test.ipynb
CHANGED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
+
"metadata": {},
|
7 |
+
"outputs": [],
|
8 |
+
"source": [
|
9 |
+
"import gradio as gr\n",
|
10 |
+
"import re\n",
|
11 |
+
"import os\n",
|
12 |
+
"import torch\n",
|
13 |
+
"\n",
|
14 |
+
"#Speech to text\n",
|
15 |
+
"import whisper\n",
|
16 |
+
"\n",
|
17 |
+
"#QA\n",
|
18 |
+
"from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline\n",
|
19 |
+
"\n",
|
20 |
+
"#TTS\n",
|
21 |
+
"import tempfile\n",
|
22 |
+
"from TTS.utils.manage import ModelManager\n",
|
23 |
+
"from TTS.utils.synthesizer import Synthesizer\n",
|
24 |
+
"from typing import Optional"
|
25 |
+
]
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"cell_type": "code",
|
29 |
+
"execution_count": 2,
|
30 |
+
"metadata": {},
|
31 |
+
"outputs": [],
|
32 |
+
"source": [
|
33 |
+
"device = \"cuda\" if torch.cuda.is_available() else \"cpu\""
|
34 |
+
]
|
35 |
+
},
|
36 |
+
{
|
37 |
+
"cell_type": "code",
|
38 |
+
"execution_count": 4,
|
39 |
+
"metadata": {},
|
40 |
+
"outputs": [
|
41 |
+
{
|
42 |
+
"name": "stdout",
|
43 |
+
"output_type": "stream",
|
44 |
+
"text": [
|
45 |
+
"0\n"
|
46 |
+
]
|
47 |
+
}
|
48 |
+
],
|
49 |
+
"source": [
|
50 |
+
"a = 0 if device == \"cuda\" else -1\n",
|
51 |
+
"print(a)"
|
52 |
+
]
|
53 |
+
},
|
54 |
+
{
|
55 |
+
"cell_type": "code",
|
56 |
+
"execution_count": null,
|
57 |
+
"metadata": {},
|
58 |
+
"outputs": [],
|
59 |
+
"source": []
|
60 |
+
}
|
61 |
+
],
|
62 |
+
"metadata": {
|
63 |
+
"kernelspec": {
|
64 |
+
"display_name": "Python 3.10.6 ('whisper')",
|
65 |
+
"language": "python",
|
66 |
+
"name": "python3"
|
67 |
+
},
|
68 |
+
"language_info": {
|
69 |
+
"codemirror_mode": {
|
70 |
+
"name": "ipython",
|
71 |
+
"version": 3
|
72 |
+
},
|
73 |
+
"file_extension": ".py",
|
74 |
+
"mimetype": "text/x-python",
|
75 |
+
"name": "python",
|
76 |
+
"nbconvert_exporter": "python",
|
77 |
+
"pygments_lexer": "ipython3",
|
78 |
+
"version": "3.10.6"
|
79 |
+
},
|
80 |
+
"orig_nbformat": 4,
|
81 |
+
"vscode": {
|
82 |
+
"interpreter": {
|
83 |
+
"hash": "bc5e005fe71b6b35d46ee1b846dc8ef412bb84e43eeae8b2cf038f4cf6818597"
|
84 |
+
}
|
85 |
+
}
|
86 |
+
},
|
87 |
+
"nbformat": 4,
|
88 |
+
"nbformat_minor": 2
|
89 |
+
}
|