Anmol Gupta commited on
Commit
df53555
1 Parent(s): 842813f

worked on colab

Browse files
Files changed (5) hide show
  1. .vscode/settings.json +2 -0
  2. Makefile +1 -1
  3. app.py +3 -1
  4. requirements.txt +6 -1
  5. requirements.txt.bak +9 -0
.vscode/settings.json ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ {
2
+ }
Makefile CHANGED
@@ -1,5 +1,5 @@
1
  install:
2
- pip install --upgrade pip &&\
3
  pip install -r requirements.txt
4
 
5
  test:
 
1
  install:
2
+ python.exe -m pip install --upgrade pip &&\
3
  pip install -r requirements.txt
4
 
5
  test:
app.py CHANGED
@@ -6,6 +6,8 @@ import warnings
6
 
7
  model = whisper.load_model("base")
8
 
 
 
9
  def transcribe(audio):
10
 
11
  # load audio and pad/trim it to fit 30 seconds
@@ -38,7 +40,7 @@ gr.Interface(
38
  title = 'OpenAI Whisper and ChatGPT ASR Gradio Web UI',
39
  fn=transcribe,
40
  inputs=[
41
- gr.inputs.Audio(source="microphone", type="filepath")
42
  ],
43
 
44
  outputs=[
 
6
 
7
  model = whisper.load_model("base")
8
 
9
+ print(model.device)
10
+
11
  def transcribe(audio):
12
 
13
  # load audio and pad/trim it to fit 30 seconds
 
40
  title = 'OpenAI Whisper and ChatGPT ASR Gradio Web UI',
41
  fn=transcribe,
42
  inputs=[
43
+ gr.Audio(source="microphone", type="filepath")
44
  ],
45
 
46
  outputs=[
requirements.txt CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
1
  gradio
2
  git+https://github.com/openai/whisper.git
3
- PyChatGPT
 
 
1
+ --extra-index-url https://download.pytorch.org/whl/cu116
2
+ torch
3
+ torchvision
4
+ torchaudio
5
  gradio
6
  git+https://github.com/openai/whisper.git
7
+ PyChatGPT
8
+ transformers
requirements.txt.bak ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ python==3.8.15
2
+ --extra-index-url https://download.pytorch.org/whl/cu116
3
+ torch
4
+ torchvision
5
+ torchaudio
6
+ gradio
7
+ git+https://github.com/openai/whisper.git
8
+ PyChatGPT
9
+ transformers