Spaces:
Sleeping
Sleeping
Use OpenRouter free Qwen2.5-Coder-32B-Instruct via LiteLLMModel
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import requests
|
|
| 5 |
import inspect
|
| 6 |
import pandas as pd
|
| 7 |
import spaces
|
| 8 |
-
from smolagents import CodeAgent,
|
| 9 |
|
| 10 |
|
| 11 |
# (Keep Constants as is)
|
|
@@ -147,9 +147,9 @@ def get_youtube_transcript(video_url: str) -> str:
|
|
| 147 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 148 |
class BasicAgent:
|
| 149 |
def __init__(self):
|
| 150 |
-
model =
|
| 151 |
-
model_id="
|
| 152 |
-
|
| 153 |
)
|
| 154 |
self.agent = CodeAgent(
|
| 155 |
tools=[DuckDuckGoSearchTool(), VisitWebpageTool(), search_wikipedia, read_file, get_youtube_transcript],
|
|
|
|
| 5 |
import inspect
|
| 6 |
import pandas as pd
|
| 7 |
import spaces
|
| 8 |
+
from smolagents import CodeAgent, LiteLLMModel, DuckDuckGoSearchTool, VisitWebpageTool, tool
|
| 9 |
|
| 10 |
|
| 11 |
# (Keep Constants as is)
|
|
|
|
| 147 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 148 |
class BasicAgent:
|
| 149 |
def __init__(self):
|
| 150 |
+
model = LiteLLMModel(
|
| 151 |
+
model_id="openrouter/qwen/qwen-2.5-coder-32b-instruct:free",
|
| 152 |
+
api_key=os.getenv("OPEN_ROUTER_API_KEY"),
|
| 153 |
)
|
| 154 |
self.agent = CodeAgent(
|
| 155 |
tools=[DuckDuckGoSearchTool(), VisitWebpageTool(), search_wikipedia, read_file, get_youtube_transcript],
|