Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,13 +15,17 @@ from flask import Flask, render_template
|
|
| 15 |
|
| 16 |
app = Flask(__name__)
|
| 17 |
|
|
|
|
| 18 |
@app.route('/')
|
| 19 |
def index():
|
| 20 |
-
return render_template('index.html') # main page
|
| 21 |
|
|
|
|
| 22 |
@app.route('/menu')
|
| 23 |
-
def
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
|
| 26 |
# Use whisper-small for faster processing and better speed
|
| 27 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 15 |
|
| 16 |
app = Flask(__name__)
|
| 17 |
|
| 18 |
+
# Define the main page route ('/')
|
| 19 |
@app.route('/')
|
| 20 |
def index():
|
| 21 |
+
return render_template('index.html') # Render your main page template
|
| 22 |
|
| 23 |
+
# Define the route for the menu page ('/menu')
|
| 24 |
@app.route('/menu')
|
| 25 |
+
def menu_page():
|
| 26 |
+
# If you need to call functions from menu.py, do it here
|
| 27 |
+
items = menu.get_menu_items() # Example: Use a function from menu.py
|
| 28 |
+
return render_template('menu.html', items=items) # Pass the data to the template
|
| 29 |
|
| 30 |
# Use whisper-small for faster processing and better speed
|
| 31 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|