Palbha Kulkarni (Nazwale) commited on
Commit
dbe03eb
·
unverified ·
1 Parent(s): 1ce08e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -16,9 +16,10 @@ button:hover { background-color: #a01010; }
16
 
17
  # Model-specific response logic
18
  def get_response(message, chat_history, model_choice, api_key):
 
19
  reply =generate_answer(message,model_choice,api_key)
20
 
21
- chat_history.append([message, reply])
22
  return reply, chat_history
23
  # Gradio app
24
  with gr.Blocks(css=custom_css) as app:
 
16
 
17
  # Model-specific response logic
18
  def get_response(message, chat_history, model_choice, api_key):
19
+ chat_history.append({'role':"user","content":message})
20
  reply =generate_answer(message,model_choice,api_key)
21
 
22
+ chat_history.append(["role":"assistant","content": reply])
23
  return reply, chat_history
24
  # Gradio app
25
  with gr.Blocks(css=custom_css) as app: