Echoforge24 commited on
Commit
e530555
·
verified ·
1 Parent(s): c2b6a45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -31,7 +31,7 @@ def chat_with_gemini(history, message):
31
 
32
  try:
33
  # Use Gemini model to generate response
34
- model = genai.GenerativeModel('gemini-pro')
35
  response = model.generate_content(conversation)
36
  bot_reply = response.text.strip()
37
  except Exception as e:
@@ -61,7 +61,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
61
  clear = gr.Button("Clear Chat")
62
 
63
  msg.submit(chat_with_gemini, [chatbot, msg], [chatbot, chatbot])
64
- clear.click(lambda: [], None, chatbot)
65
 
66
  # -------------------------
67
  # 🚀 Launch the App
 
31
 
32
  try:
33
  # Use Gemini model to generate response
34
+ model = genai.GenerativeModel('gemini-1.5-flash')
35
  response = model.generate_content(conversation)
36
  bot_reply = response.text.strip()
37
  except Exception as e:
 
61
  clear = gr.Button("Clear Chat")
62
 
63
  msg.submit(chat_with_gemini, [chatbot, msg], [chatbot, chatbot])
64
+ clear.click(lambda: [], outputs=[chatbot])
65
 
66
  # -------------------------
67
  # 🚀 Launch the App