tiantian-paris commited on
Commit
06e0899
·
1 Parent(s): 21d1d45
Files changed (4) hide show
  1. AIapp.py +14 -9
  2. __pycache__/app.cpython-312.pyc +0 -0
  3. app.py +11 -11
  4. info/info.json +1 -1
AIapp.py CHANGED
@@ -7,6 +7,8 @@ import requests
7
  import pytz
8
  import yaml
9
  import numpy as np
 
 
10
 
11
  from tools.final_answer import FinalAnswerTool
12
  from tools.visit_webpage import VisitWebpageTool
@@ -63,17 +65,20 @@ visit_webpage = VisitWebpageTool()
63
  web_search = DuckDuckGoSearchTool()
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
  #model = TransformersModel(model_id="HuggingFaceTB/SmolLM-135M-Instruct",max_tokens=1025)
68
- model = HfApiModel(
69
- max_tokens=2096,
70
- temperature=0.5,
71
- #model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
72
- model_id=model_id,
73
- # it is possible that this model may be overloaded
74
- custom_role_conversions=None,
75
- )
76
 
 
77
 
78
  # Import tool from Hub
79
  #image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
7
  import pytz
8
  import yaml
9
  import numpy as np
10
+ from huggingface_hub import InferenceClient
11
+ from smolagents import LiteLLMModel
12
 
13
  from tools.final_answer import FinalAnswerTool
14
  from tools.visit_webpage import VisitWebpageTool
 
65
  web_search = DuckDuckGoSearchTool()
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
+ #model="ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition"
70
+ model_id = "Qwen/QwQ-32B",
71
  #model = TransformersModel(model_id="HuggingFaceTB/SmolLM-135M-Instruct",max_tokens=1025)
72
+ #model = HfApiModel(
73
+ # max_tokens=2096,
74
+ # temperature=0.5,
75
+ # #model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
76
+ # model_id=model_id,
77
+ # # it is possible that this model may be overloaded
78
+ # custom_role_conversions=None,
79
+ # )
80
 
81
+ model = LiteLLMModel(model_id="anthropic/claude-3-5-sonnet-latest", temperature=0.2, max_tokens=10)
82
 
83
  # Import tool from Hub
84
  #image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
__pycache__/app.cpython-312.pyc CHANGED
Binary files a/__pycache__/app.cpython-312.pyc and b/__pycache__/app.cpython-312.pyc differ
 
app.py CHANGED
@@ -12,7 +12,7 @@ import yaml
12
  import numpy as np
13
  import smtplib
14
  import os
15
-
16
  from twilio.http.http_client import TwilioHttpClient
17
  from twilio.rest import Client
18
 
@@ -26,16 +26,16 @@ PHONE = os.getenv('phone')
26
  account_sid = os.getenv('twillo_sid')
27
  auth_token = os.getenv('twillo_token')
28
 
29
- model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
30
- model = HfApiModel(
31
- max_tokens=2096,
32
- temperature=0.5,
33
- # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
34
- model_id=model_id,
35
- # it is possible that this model may be overloaded
36
- custom_role_conversions=None,
37
- )
38
-
39
  # Import tool from Hub
40
  # image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
41
 
 
12
  import numpy as np
13
  import smtplib
14
  import os
15
+ from smolagents import LiteLLMModel
16
  from twilio.http.http_client import TwilioHttpClient
17
  from twilio.rest import Client
18
 
 
26
  account_sid = os.getenv('twillo_sid')
27
  auth_token = os.getenv('twillo_token')
28
 
29
+ # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
30
+ # model = HfApiModel(
31
+ # max_tokens=2096,
32
+ # temperature=0.5,
33
+ # # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
34
+ # model_id=model_id,
35
+ # # it is possible that this model may be overloaded
36
+ # custom_role_conversions=None,
37
+ # )
38
+ model = LiteLLMModel(model_id="anthropic/claude-3-5-sonnet-latest", temperature=0.2, max_tokens=10)
39
  # Import tool from Hub
40
  # image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
41
 
info/info.json CHANGED
@@ -5,7 +5,7 @@
5
  "education": "I hold a Master’s degree in Business Informatics from Paris Dauphine University and a Bachelor of Science in Computer Science from Pantheon-Sorbonne University. My technical skills include proficiency in programming languages like Java, PL/SQL, and Python, as well as expertise in data analytics, cloud frameworks, and financial instruments.",
6
  "skills": ["Python", "Machine Learning", "Data Analysis","Product Management","Agile Development","Risk Management"],
7
  "hobbies": ["Reading", "Hiking", "Crossfit"],
8
- "cv": ["https://www.liutianqing.com/cv"],
9
  "contact": {
10
  "email": "[email protected]",
11
  "linkedin": "https://www.linkedin.com/in/liutianqing/",
 
5
  "education": "I hold a Master’s degree in Business Informatics from Paris Dauphine University and a Bachelor of Science in Computer Science from Pantheon-Sorbonne University. My technical skills include proficiency in programming languages like Java, PL/SQL, and Python, as well as expertise in data analytics, cloud frameworks, and financial instruments.",
6
  "skills": ["Python", "Machine Learning", "Data Analysis","Product Management","Agile Development","Risk Management"],
7
  "hobbies": ["Reading", "Hiking", "Crossfit"],
8
+ "cv": ["https://liuti-ma.github.io/CV/"],
9
  "contact": {
10
  "email": "[email protected]",
11
  "linkedin": "https://www.linkedin.com/in/liutianqing/",