mmichiels13 commited on
Commit
bbcaa62
·
verified ·
1 Parent(s): bca48e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -6,7 +6,7 @@ import pandas as pd
6
 
7
  # Import our custom tools from their modules
8
  from huggingface_hub import login
9
- from smolagents import CodeAgent, InferenceClientModel
10
  from tools import web_search, visit_webpage, final_answer, go_back, close_popups, search_item_ctrl_f
11
  from retriever import load_guest_dataset
12
  from functools import lru_cache
@@ -42,6 +42,8 @@ class BasicAgent:
42
 
43
  # Create the model
44
  self.model = InferenceClientModel(model_id="Qwen/Qwen2.5-72B-Instruct")
 
 
45
 
46
  # Define your system prompt
47
  self.system_prompt = """You are a general AI assistant. I will ask you a question. Finish your answer with only: [YOUR FINAL ANSWER]. YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string."""
 
6
 
7
  # Import our custom tools from their modules
8
  from huggingface_hub import login
9
+ from smolagents import CodeAgent, InferenceClientModel, OpenAIServerModel
10
  from tools import web_search, visit_webpage, final_answer, go_back, close_popups, search_item_ctrl_f
11
  from retriever import load_guest_dataset
12
  from functools import lru_cache
 
42
 
43
  # Create the model
44
  self.model = InferenceClientModel(model_id="Qwen/Qwen2.5-72B-Instruct")
45
+ # self.model = InferenceClientModel(model_id="Qwen/Qwen2.5-7B-Instruct") #smaller/faster
46
+ # self.model = OpenAIServerModel(model_id="gpt-4o")
47
 
48
  # Define your system prompt
49
  self.system_prompt = """You are a general AI assistant. I will ask you a question. Finish your answer with only: [YOUR FINAL ANSWER]. YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string."""