Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,19 +4,19 @@ import os
|
|
| 4 |
import gradio as gr
|
| 5 |
from pydantic_ai import Agent
|
| 6 |
from pydantic_ai.mcp import MCPServerHTTP
|
| 7 |
-
from pydantic_ai.models.
|
| 8 |
-
from pydantic_ai.providers.
|
| 9 |
|
| 10 |
# MCP Server SSE URL
|
| 11 |
SSE_URL = "https://oppaai-job-search-mcp-server.hf.space/gradio_api/mcp/sse"
|
| 12 |
server = MCPServerHTTP(url=SSE_URL)
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
# Use OpenRouter hosted LLM Qwen3-30B-A3B model
|
| 17 |
-
model =
|
| 18 |
-
'
|
| 19 |
-
|
| 20 |
)
|
| 21 |
|
| 22 |
# Create Agent with MCP Server
|
|
|
|
| 4 |
import gradio as gr
|
| 5 |
from pydantic_ai import Agent
|
| 6 |
from pydantic_ai.mcp import MCPServerHTTP
|
| 7 |
+
from pydantic_ai.models.gemini import GeminiModel
|
| 8 |
+
from pydantic_ai.providers.google_gla import GoogleGLAProvider
|
| 9 |
|
| 10 |
# MCP Server SSE URL
|
| 11 |
SSE_URL = "https://oppaai-job-search-mcp-server.hf.space/gradio_api/mcp/sse"
|
| 12 |
server = MCPServerHTTP(url=SSE_URL)
|
| 13 |
|
| 14 |
+
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY") # Make sure your GEMINI_API_KEY is set in environment variables
|
| 15 |
|
| 16 |
# Use OpenRouter hosted LLM Qwen3-30B-A3B model
|
| 17 |
+
model = GeminiModel(
|
| 18 |
+
'gemini-2.0-flash',
|
| 19 |
+
provider=GoogleGLAProvider(api_key=GEMINI_API_KEY)
|
| 20 |
)
|
| 21 |
|
| 22 |
# Create Agent with MCP Server
|