taratrankennedy commited on
Commit
b1ef128
·
verified ·
1 Parent(s): b8e6954

Add 'restaurants' list

Browse files
Files changed (1) hide show
  1. app.py +34 -2
app.py CHANGED
@@ -77,6 +77,39 @@ def generate_response(user_query, relevant_segment):
77
  print(f"Error in generating response: {e}")
78
  return f"Error in generating response: {e}"
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  def find_restaurants(criteria):
81
  """
82
  Finds restaurants based on the given criteria.
@@ -187,7 +220,6 @@ welcome_message = """
187
  # Welcome to Ethical Eats Explorer!
188
  ## Your AI-driven assistant for restaurant recs in Seattle. Created by Saranya, Cindy, and Liana of the 2024 Kode With Klossy Seattle Camp.
189
  """
190
-
191
  topics = """
192
  ### Please give me your restaurant preferences:
193
  - Dietary Restrictions
@@ -211,4 +243,4 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
211
  submit_button.click(fn=query_model, inputs=question, outputs=answer)
212
 
213
  # Launch the Gradio app to allow user interaction
214
- demo.launch(share=True)
 
77
  print(f"Error in generating response: {e}")
78
  return f"Error in generating response: {e}"
79
 
80
+ # Define a sample list of restaurants (replace this with your actual data source)
81
+ restaurants = [
82
+ {
83
+ "name": "Saffron Grill",
84
+ "cuisine": "Middle Eastern",
85
+ "price": "Moderate",
86
+ "gluten_free": True,
87
+ "vegan": False,
88
+ "lactose_intolerant": True,
89
+ "pescatarian": True,
90
+ "allergen_friendly": False,
91
+ "halal": True,
92
+ "kosher": False,
93
+ "vegetarian": True,
94
+ "website": "https://www.saffrongrill.com"
95
+ },
96
+ {
97
+ "name": "Tasty Thai",
98
+ "cuisine": "Thai",
99
+ "price": "Low",
100
+ "gluten_free": False,
101
+ "vegan": True,
102
+ "lactose_intolerant": True,
103
+ "pescatarian": True,
104
+ "allergen_friendly": True,
105
+ "halal": False,
106
+ "kosher": False,
107
+ "vegetarian": True,
108
+ "website": "https://www.tastythai.com"
109
+ },
110
+ # Add more restaurant entries as needed
111
+ ]
112
+
113
  def find_restaurants(criteria):
114
  """
115
  Finds restaurants based on the given criteria.
 
220
  # Welcome to Ethical Eats Explorer!
221
  ## Your AI-driven assistant for restaurant recs in Seattle. Created by Saranya, Cindy, and Liana of the 2024 Kode With Klossy Seattle Camp.
222
  """
 
223
  topics = """
224
  ### Please give me your restaurant preferences:
225
  - Dietary Restrictions
 
243
  submit_button.click(fn=query_model, inputs=question, outputs=answer)
244
 
245
  # Launch the Gradio app to allow user interaction
246
+ demo.launch(share=True)