Ritesh-hf commited on
Commit
675181b
·
verified ·
1 Parent(s): 582ec29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -195,12 +195,12 @@ def respond_to_user(image, message):
195
  response = question_answer_chain.invoke(formated_input)
196
  except Exception as e:
197
  response = {'content':"An error occurred while processing your request."}
198
- return response
199
 
200
  iface = gr.Interface(
201
  fn=respond_to_user,
202
  inputs=[gr.Image(), gr.Textbox(label="Ask Query")],
203
- outputs=gr.Textbox(label="Nutrition-GPT"),
204
  title="Nutrition-GPT Demo",
205
  description="Upload an food image and ask queries!",
206
  css=".component-12 {background-color: red}",
 
195
  response = question_answer_chain.invoke(formated_input)
196
  except Exception as e:
197
  response = {'content':"An error occurred while processing your request."}
198
+ return response, data
199
 
200
  iface = gr.Interface(
201
  fn=respond_to_user,
202
  inputs=[gr.Image(), gr.Textbox(label="Ask Query")],
203
+ outputs=[gr.Textbox(label="Nutrition-GPT"), gr.Textbox(label="context")],
204
  title="Nutrition-GPT Demo",
205
  description="Upload an food image and ask queries!",
206
  css=".component-12 {background-color: red}",