AnaviJoshi commited on
Commit
e5921df
·
verified ·
1 Parent(s): a24bb8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -58,7 +58,7 @@ def get_top_chunks(query): # store a function that gets the most relevant_info a
58
  client = InferenceClient("google/gemma-3-27b-it")
59
 
60
 
61
- def respond(message, image_input_data, history):
62
 
63
  system_message = "You are a helpful chatbot named scooby, kinda like the cartoon character but not too much like it, who knows alot about pets and their diets and loves helping pet owners, and can only answer questions about pets"
64
  messages = [{"role": "system", "content": system_message}]
@@ -114,12 +114,13 @@ with gr.Blocks(theme=theme) as demo:
114
  gr.Markdown(topics)
115
  with gr.Row():
116
  text_input = gr.Textbox(label="Ask Scooby a question about your pet")
117
- image_input = gr.Image(type="pil", label="Upload an image of your pet (optional)")
118
  output = gr.Textbox(label="Scooby's Answer")
119
 
120
  submit_btn = gr.Button("Ask Scooby")
121
 
122
- submit_btn.click(fn=respond, inputs=[text_input, image_input], outputs=output)
 
123
 
124
 
125
 
 
58
  client = InferenceClient("google/gemma-3-27b-it")
59
 
60
 
61
+ def respond(message, history):
62
 
63
  system_message = "You are a helpful chatbot named scooby, kinda like the cartoon character but not too much like it, who knows alot about pets and their diets and loves helping pet owners, and can only answer questions about pets"
64
  messages = [{"role": "system", "content": system_message}]
 
114
  gr.Markdown(topics)
115
  with gr.Row():
116
  text_input = gr.Textbox(label="Ask Scooby a question about your pet")
117
+ # image_input = gr.Image(type="pil", label="Upload an image of your pet (optional)")
118
  output = gr.Textbox(label="Scooby's Answer")
119
 
120
  submit_btn = gr.Button("Ask Scooby")
121
 
122
+ submit_btn.click(fn=respond, outputs=output)
123
+ #inputs=[text_input, image_input can be added once error fixed
124
 
125
 
126