akhaliq HF staff commited on
Commit
81e2b71
1 Parent(s): 91a9343

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -80,7 +80,7 @@ def chatbot_response(api_key, user_message, user_image, history):
80
  """
81
  # Append the user's message to the history
82
  if user_message or user_image:
83
- history.append((user_message, user_image))
84
 
85
  # Get the API response
86
  api_result = get_api_response(api_key, user_message, user_image)
@@ -91,7 +91,7 @@ def chatbot_response(api_key, user_message, user_image, history):
91
  ai_message = api_result["response"]
92
 
93
  # Append the AI's response to the history
94
- history.append((ai_message, None))
95
 
96
  return history, history
97
 
@@ -126,7 +126,7 @@ with gr.Blocks() as demo:
126
  user_image = gr.Image(
127
  label="Upload Image",
128
  type="file",
129
- tool="editor",
130
  interactive=True
131
  )
132
 
 
80
  """
81
  # Append the user's message to the history
82
  if user_message or user_image:
83
+ history.append(("User", user_message, user_image))
84
 
85
  # Get the API response
86
  api_result = get_api_response(api_key, user_message, user_image)
 
91
  ai_message = api_result["response"]
92
 
93
  # Append the AI's response to the history
94
+ history.append(("AI", ai_message, None))
95
 
96
  return history, history
97
 
 
126
  user_image = gr.Image(
127
  label="Upload Image",
128
  type="file",
129
+ # Removed the 'tool' parameter
130
  interactive=True
131
  )
132