Spaces:
Build error
Build error
adding upload folder
Browse files
app.py
CHANGED
@@ -3,16 +3,15 @@ import whisper
|
|
3 |
from flask import Flask, jsonify, render_template, request, send_file
|
4 |
from werkzeug.utils import secure_filename
|
5 |
|
6 |
-
|
7 |
-
app = Flask(__name__)
|
8 |
-
|
9 |
STARTING_SIZE = 'small'
|
10 |
UPLOAD_FOLDER = 'uploads'
|
11 |
ALLOWED_EXTENSIONS = {'ogg', 'mp3', 'mp4', 'wav',
|
12 |
'flac', 'm4a', 'aac', 'wma', 'webm', 'opus'}
|
|
|
13 |
|
|
|
|
|
14 |
|
15 |
-
current_size = STARTING_SIZE
|
16 |
model = whisper.load_model(current_size)
|
17 |
model_en = whisper.load_model(f"{current_size}.en")
|
18 |
|
|
|
3 |
from flask import Flask, jsonify, render_template, request, send_file
|
4 |
from werkzeug.utils import secure_filename
|
5 |
|
|
|
|
|
|
|
6 |
STARTING_SIZE = 'small'
|
7 |
UPLOAD_FOLDER = 'uploads'
|
8 |
ALLOWED_EXTENSIONS = {'ogg', 'mp3', 'mp4', 'wav',
|
9 |
'flac', 'm4a', 'aac', 'wma', 'webm', 'opus'}
|
10 |
+
current_size = STARTING_SIZE
|
11 |
|
12 |
+
app = Flask(__name__)
|
13 |
+
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
|
14 |
|
|
|
15 |
model = whisper.load_model(current_size)
|
16 |
model_en = whisper.load_model(f"{current_size}.en")
|
17 |
|