Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,6 @@ import requests
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
-
import os
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
|
@@ -36,24 +35,13 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 36 |
|
| 37 |
|
| 38 |
final_answer = FinalAnswerTool()
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
# )
|
| 45 |
-
|
| 46 |
-
together_api_key = os.getenv("together_api_key")
|
| 47 |
-
|
| 48 |
-
# custom_role_conversions = {"tool-call": "assistant", "tool-response": "user"}
|
| 49 |
-
model = OpenAIServerModel(
|
| 50 |
-
model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 51 |
-
custom_role_conversions=None,
|
| 52 |
-
api_key=together_api_key,
|
| 53 |
-
api_base='https://api.together.xyz/v1'
|
| 54 |
)
|
| 55 |
|
| 56 |
-
|
| 57 |
# Import tool from Hub
|
| 58 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 59 |
|
|
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
|
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
|
|
|
| 35 |
|
| 36 |
|
| 37 |
final_answer = FinalAnswerTool()
|
| 38 |
+
model = HfApiModel(
|
| 39 |
+
max_tokens=2096,
|
| 40 |
+
temperature=0.5,
|
| 41 |
+
model_id='meta-llama/Meta-Llama-3-8B-Instruct',
|
| 42 |
+
custom_role_conversions=None,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
)
|
| 44 |
|
|
|
|
| 45 |
# Import tool from Hub
|
| 46 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 47 |
|