Walid-Ahmed commited on
Commit
b94d057
·
verified ·
1 Parent(s): 1fae598

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -6,8 +6,7 @@ import whisper
6
  from transformers import pipeline
7
 
8
  # Load the tiny Whisper model
9
- whisper_model = whisper.load_model("tiny")
10
- model = whisper.load_model("base")
11
 
12
  # Check if GPU is available and set device accordingly
13
  device = 0 if torch.cuda.is_available() else -1
@@ -16,6 +15,10 @@ if device == 0:
16
  else:
17
  print("Running on CPU")
18
 
 
 
 
 
19
  # Load the text summarization model from Hugging Face
20
  summarizer = pipeline(task="summarization", model="facebook/bart-large-cnn", device=device)
21
 
 
6
  from transformers import pipeline
7
 
8
  # Load the tiny Whisper model
9
+
 
10
 
11
  # Check if GPU is available and set device accordingly
12
  device = 0 if torch.cuda.is_available() else -1
 
15
  else:
16
  print("Running on CPU")
17
 
18
+ whisper_model = whisper.load_model("tiny", device=device)
19
+ #model = whisper.load_model("base")
20
+
21
+
22
  # Load the text summarization model from Hugging Face
23
  summarizer = pipeline(task="summarization", model="facebook/bart-large-cnn", device=device)
24