Spaces:
Running
Running
Commit
·
7ba8354
1
Parent(s):
826ab18
updated to Gemini 2.0 Flash
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ import os
|
|
6 |
API_KEY = os.getenv("GEMINI_API_KEY") # Set this in Hugging Face secrets
|
7 |
genai.configure(api_key=API_KEY)
|
8 |
|
9 |
-
# Use Gemini
|
10 |
-
model = genai.GenerativeModel("gemini-
|
11 |
|
12 |
def chatbot(prompt, history=[]):
|
13 |
"""Generates a chatbot response using the free-tier Gemini API."""
|
|
|
6 |
API_KEY = os.getenv("GEMINI_API_KEY") # Set this in Hugging Face secrets
|
7 |
genai.configure(api_key=API_KEY)
|
8 |
|
9 |
+
# Use Gemini 2.0 Flash (free-tier accessible)
|
10 |
+
model = genai.GenerativeModel("gemini-2.0-flash")
|
11 |
|
12 |
def chatbot(prompt, history=[]):
|
13 |
"""Generates a chatbot response using the free-tier Gemini API."""
|