MarziehFadaee commited on
Commit
a7bec97
1 Parent(s): 619d3fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,8 +11,8 @@ cohere_api_key = os.getenv("COHERE_API_KEY")
11
  co = cohere.Client(cohere_api_key, client_name="huggingface-rp")
12
 
13
 
14
- def trigger_example(example, cid, token):
15
- chat, updated_history = generate_response(example, cid, token)
16
  return chat, updated_history
17
 
18
  def generate_response(user_message, cid, token, history=None):
@@ -126,7 +126,7 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
126
  with gr.Row():
127
  gr.Examples(
128
  examples=examples,
129
- inputs=[user_message, cid, token],
130
  cache_examples=False,
131
  fn=trigger_example,
132
  outputs=[chatbot],
 
11
  co = cohere.Client(cohere_api_key, client_name="huggingface-rp")
12
 
13
 
14
+ def trigger_example(example):
15
+ chat, updated_history = generate_response(example)
16
  return chat, updated_history
17
 
18
  def generate_response(user_message, cid, token, history=None):
 
126
  with gr.Row():
127
  gr.Examples(
128
  examples=examples,
129
+ inputs=user_message,
130
  cache_examples=False,
131
  fn=trigger_example,
132
  outputs=[chatbot],