lokesh341 commited on
Commit
cd2c91d
·
verified ·
1 Parent(s): 26c2135

Update templates/menu_page.html

Browse files
Files changed (1) hide show
  1. templates/menu_page.html +6 -5
templates/menu_page.html CHANGED
@@ -1,16 +1,16 @@
1
 
2
-
3
- <!DOCTYPE html>
4
  <html lang="en">
5
  <head>
6
  <meta charset="UTF-8">
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
  <title>Menu - Biryani Hub</title>
9
  <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
 
10
  <script>
11
- // Function to fetch menu from the API
12
  function fetchMenu() {
13
- fetch("https://lokesh341-voicemenuwithregisterandloginnnwithmenuu.hf.space/menu")
14
  .then(response => response.json())
15
  .then(data => {
16
  if (data.success) {
@@ -23,9 +23,9 @@
23
 
24
  menuItem.innerHTML = `
25
  <h3>${item.name}</h3>
 
26
  <p><strong>Price:</strong> $${item.price}</p>
27
  <p><strong>Ingredients:</strong> ${item.ingredients}</p>
28
- <p><strong>Category:</strong> ${item.category}</p>
29
  `;
30
 
31
  menuContainer.appendChild(menuItem);
@@ -43,6 +43,7 @@
43
  // Load menu when page loads
44
  window.onload = fetchMenu;
45
  </script>
 
46
  <style>
47
  body {
48
  font-family: Arial, sans-serif;
 
1
 
2
+ <!DOCTYPE html>
 
3
  <html lang="en">
4
  <head>
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
  <title>Menu - Biryani Hub</title>
8
  <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
9
+
10
  <script>
11
+ // Function to fetch menu from Flask API
12
  function fetchMenu() {
13
+ fetch("/menu") // Use relative path to work inside Hugging Face Space
14
  .then(response => response.json())
15
  .then(data => {
16
  if (data.success) {
 
23
 
24
  menuItem.innerHTML = `
25
  <h3>${item.name}</h3>
26
+ <p><strong>Category:</strong> ${item.category}</p>
27
  <p><strong>Price:</strong> $${item.price}</p>
28
  <p><strong>Ingredients:</strong> ${item.ingredients}</p>
 
29
  `;
30
 
31
  menuContainer.appendChild(menuItem);
 
43
  // Load menu when page loads
44
  window.onload = fetchMenu;
45
  </script>
46
+
47
  <style>
48
  body {
49
  font-family: Arial, sans-serif;