Anmol3263 commited on
Commit
a27b2fa
·
verified ·
1 Parent(s): 22b9122

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,12 +12,12 @@ client = genai.Client(api_key=API_KEY)
12
  def chat(message, history):
13
  try:
14
  response = client.models.generate_content(
15
- model="gemini-1.5-flash-latest", # 🔥 FIXED
16
  contents=message
17
  )
18
  return response.text
19
  except Exception as e:
20
  return f"❌ Error: {str(e)}"
21
 
22
- iface = gr.ChatInterface(fn=chat, title="Jarvis AI 🤖")
23
- iface.launch()
 
12
  def chat(message, history):
13
  try:
14
  response = client.models.generate_content(
15
+ model="gemini-1.5-flash-latest", # ONLY THIS
16
  contents=message
17
  )
18
  return response.text
19
  except Exception as e:
20
  return f"❌ Error: {str(e)}"
21
 
22
+ gr.ChatInterface(fn=chat, title="Jarvis AI 🤖").launch()
23
+