Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,14 @@ import requests # Import requests for exception handling
|
|
| 14 |
|
| 15 |
app = Flask(__name__)
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# Use whisper-small for faster processing and better speed
|
| 18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 19 |
|
|
@@ -213,3 +221,5 @@ def transcribe():
|
|
| 213 |
# Start Production Server
|
| 214 |
if __name__ == "__main__":
|
| 215 |
serve(app, host="0.0.0.0", port=7860)
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
app = Flask(__name__)
|
| 16 |
|
| 17 |
+
@app.route('/')
|
| 18 |
+
def index():
|
| 19 |
+
return render_template('index.html') # main page
|
| 20 |
+
|
| 21 |
+
@app.route('/menu')
|
| 22 |
+
def menu():
|
| 23 |
+
return render_template('menu.html') # menu page
|
| 24 |
+
|
| 25 |
# Use whisper-small for faster processing and better speed
|
| 26 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 27 |
|
|
|
|
| 221 |
# Start Production Server
|
| 222 |
if __name__ == "__main__":
|
| 223 |
serve(app, host="0.0.0.0", port=7860)
|
| 224 |
+
if __name__ == '__main__':
|
| 225 |
+
app.run(debug=True)
|