Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,9 +10,14 @@ from dotenv import load_dotenv
|
|
| 10 |
# Load environment variables
|
| 11 |
load_dotenv()
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# Create the Agent with a more natural, imperfect human-like writing style
|
| 14 |
agent = Agent(
|
| 15 |
-
model=
|
| 16 |
tools=[DuckDuckGo(), Newspaper4k()],
|
| 17 |
description="You write like a real person, not a robot. Your writing is simple, engaging, and casual—like a conversation with a friend.",
|
| 18 |
instructions=[
|
|
|
|
| 10 |
# Load environment variables
|
| 11 |
load_dotenv()
|
| 12 |
|
| 13 |
+
API_KEY = os.getenv("GOOGLE_API_KEY")
|
| 14 |
+
if API_KEY:
|
| 15 |
+
genai.configure(api_key=API_KEY)
|
| 16 |
+
|
| 17 |
+
|
| 18 |
# Create the Agent with a more natural, imperfect human-like writing style
|
| 19 |
agent = Agent(
|
| 20 |
+
model=Gemini(id="gemini-2.0-flash-exp"),
|
| 21 |
tools=[DuckDuckGo(), Newspaper4k()],
|
| 22 |
description="You write like a real person, not a robot. Your writing is simple, engaging, and casual—like a conversation with a friend.",
|
| 23 |
instructions=[
|