Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
|
| 3 |
# Google Gemini
|
| 4 |
-
from litellm import
|
| 5 |
|
| 6 |
import datetime
|
| 7 |
import requests
|
|
@@ -42,10 +42,10 @@ final_answer = FinalAnswerTool()
|
|
| 42 |
polite_guard = PoliteGuardTool()
|
| 43 |
web_search = DuckDuckGoSearchTool()
|
| 44 |
|
| 45 |
-
|
| 46 |
# Switch to Gemini if this model gets overloaded
|
| 47 |
my_id = 'Qwen/Qwen2.5-Coder-32B-Instruct'
|
| 48 |
-
|
| 49 |
model = HfApiModel(
|
| 50 |
max_tokens=2096,
|
| 51 |
temperature=0.5,
|
|
@@ -62,7 +62,7 @@ model = LiteLLMModel(
|
|
| 62 |
api_key=os.getenv("LITELLM_API_KEY")
|
| 63 |
)
|
| 64 |
|
| 65 |
-
|
| 66 |
# Import tool from Hub
|
| 67 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 68 |
|
|
|
|
| 1 |
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
|
| 3 |
# Google Gemini
|
| 4 |
+
#from litellm import LiteLLMModel, RateLimitError
|
| 5 |
|
| 6 |
import datetime
|
| 7 |
import requests
|
|
|
|
| 42 |
polite_guard = PoliteGuardTool()
|
| 43 |
web_search = DuckDuckGoSearchTool()
|
| 44 |
|
| 45 |
+
|
| 46 |
# Switch to Gemini if this model gets overloaded
|
| 47 |
my_id = 'Qwen/Qwen2.5-Coder-32B-Instruct'
|
| 48 |
+
my_id="https://ntqicork29enjoy5.us-east4.gcp.endpoints.huggingface.cloud"
|
| 49 |
model = HfApiModel(
|
| 50 |
max_tokens=2096,
|
| 51 |
temperature=0.5,
|
|
|
|
| 62 |
api_key=os.getenv("LITELLM_API_KEY")
|
| 63 |
)
|
| 64 |
|
| 65 |
+
'''
|
| 66 |
# Import tool from Hub
|
| 67 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 68 |
|