venthan commited on
Commit
6a3d30f
1 Parent(s): 77388cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,7 +17,7 @@ def on_token_change(user_token):
17
  # openai.api_key = user_token
18
  pass
19
 
20
- def submit_message(user_token, prompt, prompt_template, good_foods, bad_foods, temperature, max_tokens, context_length, state):
21
 
22
  history = state['messages']
23
 
@@ -134,11 +134,11 @@ with gr.Blocks(css=css) as demo:
134
 
135
  btn_submit.click(
136
  submit_message,
137
- [user_token, input_message, prompt_template, good_foods, bad_foods, temperature, max_tokens, context_length, state],
138
  [input_message, chatbot, total_tokens_str, state, table])
139
  input_message.submit(
140
  submit_message,
141
- [user_token, input_message, prompt_template, good_foods, bad_foods, temperature, max_tokens, context_length, state],
142
  [input_message, chatbot, total_tokens_str, state, table])
143
  btn_clear_conversation.click(
144
  clear_conversation, [],
 
17
  # openai.api_key = user_token
18
  pass
19
 
20
+ def submit_message(prompt, prompt_template, good_foods, bad_foods, temperature, max_tokens, context_length, state):
21
 
22
  history = state['messages']
23
 
 
134
 
135
  btn_submit.click(
136
  submit_message,
137
+ [input_message, prompt_template, good_foods, bad_foods, temperature, max_tokens, context_length, state],
138
  [input_message, chatbot, total_tokens_str, state, table])
139
  input_message.submit(
140
  submit_message,
141
+ [input_message, prompt_template, good_foods, bad_foods, temperature, max_tokens, context_length, state],
142
  [input_message, chatbot, total_tokens_str, state, table])
143
  btn_clear_conversation.click(
144
  clear_conversation, [],