mgerlitz commited on
Commit
b290180
·
verified ·
1 Parent(s): e92e8bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -2
app.py CHANGED
@@ -48,8 +48,29 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
48
 
49
 
50
 
51
- model = InferenceClientModel(model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud')
52
- agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  #agent = BasicAgent()
55
  except Exception as e:
 
48
 
49
 
50
 
51
+ model = HfApiModel(
52
+ max_tokens=2096,
53
+ temperature=0.5,
54
+ model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
55
+ #model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
56
+ custom_role_conversions=None,
57
+ )
58
+
59
+ with open("prompts.yaml", 'r') as stream:
60
+ prompt_templates = yaml.safe_load(stream)
61
+
62
+ # We're creating our CodeAgent
63
+ agent = CodeAgent(
64
+ model=model,
65
+ tools=[final_answer, DuckDuckGoSearchTool()],
66
+ max_steps=6,
67
+ verbosity_level=1,
68
+ grammar=None,
69
+ planning_interval=None,
70
+ name=None,
71
+ description=None,
72
+ prompt_templates=prompt_templates
73
+ )
74
 
75
  #agent = BasicAgent()
76
  except Exception as e: