cha0smagick commited on
Commit
5942d3d
1 Parent(s): 6bc1c36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -15,12 +15,12 @@ def clean_text(text):
15
  return cleaned_text
16
 
17
 
18
- def generate_response(cleaned_input, model, image_file):
19
  global error_flag # Use the global error_flag variable
20
 
21
  try:
22
  # Generate response using the model
23
- response = model.generate_content(text_input=cleaned_input, image_input=image_file, stream=True)
24
 
25
  # Display the generated response
26
  full_response = ""
@@ -107,7 +107,7 @@ def main():
107
  )
108
 
109
  # Generate the response
110
- full_response = generate_response(bot_command, model, img)
111
 
112
  # Display the generated response
113
  st.success(full_response)
 
15
  return cleaned_text
16
 
17
 
18
+ def generate_response(contents, model, image_file):
19
  global error_flag # Use the global error_flag variable
20
 
21
  try:
22
  # Generate response using the model
23
+ response = model.generate_content(contents, image=image_file, stream=True)
24
 
25
  # Display the generated response
26
  full_response = ""
 
107
  )
108
 
109
  # Generate the response
110
+ full_response = generate_response([bot_command, cleaned_input], model, [img, user_input])
111
 
112
  # Display the generated response
113
  st.success(full_response)