akhaliq HF Staff commited on
Commit
73eca71
·
verified ·
1 Parent(s): 5681882

Update app.py from anycoder

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,7 +11,7 @@ client = OpenAI(
11
  }
12
  )
13
 
14
- def process_message(message, history, image, profile):
15
  """
16
  Process user message and image, send to the model, and return the response.
17
  """
@@ -100,14 +100,14 @@ with gr.Blocks() as demo:
100
  # Set up the chat interface
101
  msg.submit(
102
  fn=process_message,
103
- inputs=[msg, chatbot, img, gr.OAuthProfile()],
104
  outputs=[chatbot, chatbot],
105
  api_visibility="public"
106
  )
107
 
108
  submit_btn.click(
109
  fn=process_message,
110
- inputs=[msg, chatbot, img, gr.OAuthProfile()],
111
  outputs=[chatbot, chatbot],
112
  api_visibility="public"
113
  )
 
11
  }
12
  )
13
 
14
+ def process_message(message, history, image, profile: gr.OAuthProfile, token: gr.OAuthToken):
15
  """
16
  Process user message and image, send to the model, and return the response.
17
  """
 
100
  # Set up the chat interface
101
  msg.submit(
102
  fn=process_message,
103
+ inputs=[msg, chatbot, img],
104
  outputs=[chatbot, chatbot],
105
  api_visibility="public"
106
  )
107
 
108
  submit_btn.click(
109
  fn=process_message,
110
+ inputs=[msg, chatbot, img],
111
  outputs=[chatbot, chatbot],
112
  api_visibility="public"
113
  )