Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ import yaml
|
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from tools.web_search import DuckDuckGoSearchTool
|
| 8 |
from tools.visit_webpage import VisitWebpageTool
|
|
|
|
| 9 |
from huggingface_hub import InferenceClient
|
| 10 |
from Gradio_UI import GradioUI
|
| 11 |
from PIL import Image
|
|
@@ -61,12 +62,13 @@ def image_generator(description: str)->Image.Image :
|
|
| 61 |
final_answer = FinalAnswerTool()
|
| 62 |
web_search = DuckDuckGoSearchTool()
|
| 63 |
visit_webpage = VisitWebpageTool()
|
|
|
|
| 64 |
|
| 65 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 66 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 67 |
|
| 68 |
model = HfApiModel(
|
| 69 |
-
max_tokens=
|
| 70 |
temperature=0.5,
|
| 71 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 72 |
custom_role_conversions=None,
|
|
@@ -81,7 +83,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 81 |
|
| 82 |
agent = CodeAgent(
|
| 83 |
model=model,
|
| 84 |
-
tools=[final_answer,get_current_time_in_timezone, image_generator, web_search, visit_webpage], ## add your tools here (don't remove final answer)
|
| 85 |
max_steps=6,
|
| 86 |
verbosity_level=1,
|
| 87 |
grammar=None,
|
|
|
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from tools.web_search import DuckDuckGoSearchTool
|
| 8 |
from tools.visit_webpage import VisitWebpageTool
|
| 9 |
+
from tools.social_media_profile import SocialMediaSearchTool
|
| 10 |
from huggingface_hub import InferenceClient
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
from PIL import Image
|
|
|
|
| 62 |
final_answer = FinalAnswerTool()
|
| 63 |
web_search = DuckDuckGoSearchTool()
|
| 64 |
visit_webpage = VisitWebpageTool()
|
| 65 |
+
socia_media = SocialMediaSearchTool()
|
| 66 |
|
| 67 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 68 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 69 |
|
| 70 |
model = HfApiModel(
|
| 71 |
+
max_tokens=1024,
|
| 72 |
temperature=0.5,
|
| 73 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 74 |
custom_role_conversions=None,
|
|
|
|
| 83 |
|
| 84 |
agent = CodeAgent(
|
| 85 |
model=model,
|
| 86 |
+
tools=[final_answer,get_current_time_in_timezone, image_generator, web_search, visit_webpage, social_media], ## add your tools here (don't remove final answer)
|
| 87 |
max_steps=6,
|
| 88 |
verbosity_level=1,
|
| 89 |
grammar=None,
|