smamidipaka commited on
Commit
12594d7
·
verified ·
1 Parent(s): 97ee006

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -106,9 +106,7 @@ def query_model(question):
106
  response = generate_response(question, relevant_segment)
107
  return response
108
 
109
- if(response == return):
110
- print("Thank you so much for visiting our website and learning more about how to sort your trash! According to the EPA, as
111
- much as 25% of all recycling is contaminated and cannot be recycled. With your help, we can reduce that percentage so less waste is going into our landfills. This is crucial for the preservation of our environment as the amount of space on this planet is limited, so one day we will run out of places to store our trash! Once again, we are so grateful that you are helping the planet become a better place by learning about how to recycle and compost correctly!")
112
 
113
 
114
 
@@ -140,7 +138,14 @@ topics = """
140
  - **Mixed materials that cannot be separated**
141
  - **Items contaminated with food**
142
  """
143
-
 
 
 
 
 
 
 
144
  # Setup the Gradio Blocks interface with custom layout components
145
  with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
146
  gr.Markdown(welcome_message) # Display the formatted welcome message
@@ -153,7 +158,7 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
153
  answer = gr.Textbox(label="GreenGuide Response", placeholder="GreenGuide will respond here...", interactive=False, lines=10)
154
  submit_button = gr.Button("Submit")
155
  submit_button.click(fn=query_model, inputs=question, outputs=answer)
156
-
157
 
158
  # Launch the Gradio app to allow user interaction
159
  demo.launch(share=True)
 
106
  response = generate_response(question, relevant_segment)
107
  return response
108
 
109
+
 
 
110
 
111
 
112
 
 
138
  - **Mixed materials that cannot be separated**
139
  - **Items contaminated with food**
140
  """
141
+ thankyou_message = """
142
+ ## Thank you so much for visiting our website and learning more about how to sort your trash! According to the EPA, as
143
+ much as 25% of all recycling is contaminated and cannot be recycled. With your help, we can reduce that percentage so
144
+ less waste is going into our landfills. This is crucial for the preservation of our environment as the amount of space
145
+ on this planet is limited, so one day we will run out of places to store our trash! Once again, we are so grateful that
146
+ you are helping the planet become a better place by learning about how to recycle and compost correctly 💚🌲!
147
+ """
148
+ ##
149
  # Setup the Gradio Blocks interface with custom layout components
150
  with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
151
  gr.Markdown(welcome_message) # Display the formatted welcome message
 
158
  answer = gr.Textbox(label="GreenGuide Response", placeholder="GreenGuide will respond here...", interactive=False, lines=10)
159
  submit_button = gr.Button("Submit")
160
  submit_button.click(fn=query_model, inputs=question, outputs=answer)
161
+ gr.Markdown(thankyou_message)
162
 
163
  # Launch the Gradio app to allow user interaction
164
  demo.launch(share=True)