aubrigene949 commited on
Commit
4dca7b1
·
verified ·
1 Parent(s): 567b8f9

Update app.py

Browse files

Using openai gpt-4o

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -8,6 +8,7 @@ import datetime
8
  import requests
9
  import pytz
10
  from tools.final_answer import FinalAnswerTool
 
11
 
12
  # (Keep Constants as is)
13
  # --- Constants ---
@@ -47,11 +48,13 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
47
  # 1. Instantiate Agent ( modify this part to create your agent)
48
  try:
49
  # agent = BasicAgent()
 
50
  hf_token = os.getenv('hf_token')
51
  model = HfApiModel(
52
  max_tokens=2096,
53
  temperature=0.5,
54
- model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
 
55
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
56
  custom_role_conversions=None,
57
  )
 
8
  import requests
9
  import pytz
10
  from tools.final_answer import FinalAnswerTool
11
+ import openai
12
 
13
  # (Keep Constants as is)
14
  # --- Constants ---
 
48
  # 1. Instantiate Agent ( modify this part to create your agent)
49
  try:
50
  # agent = BasicAgent()
51
+ openai.api_key = os.getenv('my_key')
52
  hf_token = os.getenv('hf_token')
53
  model = HfApiModel(
54
  max_tokens=2096,
55
  temperature=0.5,
56
+ # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
57
+ model_id='gpt-4o',
58
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
59
  custom_role_conversions=None,
60
  )