Adibvafa commited on
Commit
73cdf02
·
1 Parent(s): 5f1cf99
Files changed (1) hide show
  1. main.py +2 -5
main.py CHANGED
@@ -65,9 +65,6 @@ def initialize_agent(
65
  prompts = load_prompts_from_file(prompt_file)
66
  prompt = prompts[system_prompt]
67
 
68
- # Define the URL of the MedGemma FastAPI service.
69
- MEDGEMMA_API_URL = os.getenv("MEDGEMMA_API_URL", "http://172.17.8.141:8002")
70
-
71
  all_tools = {
72
  "TorchXRayVisionClassifierTool": lambda: TorchXRayVisionClassifierTool(device=device),
73
  "ArcPlusClassifierTool": lambda: ArcPlusClassifierTool(cache_dir=model_dir, device=device),
@@ -91,7 +88,7 @@ def initialize_agent(
91
  "MedSAM2Tool": lambda: MedSAM2Tool(
92
  device=device, cache_dir=model_dir, temp_dir=temp_dir
93
  ),
94
- "MedGemmaVQATool": lambda: MedGemmaAPIClientTool(cache_dir=model_dir, device=device, api_url=MEDGEMMA_API_URL)
95
  }
96
 
97
  # Initialize only selected tools or all if none specified
@@ -211,7 +208,7 @@ if __name__ == "__main__":
211
  model_dir="/model-weights",
212
  temp_dir="temp2", # Change this to the path of the temporary directory
213
  device="cuda:0",
214
- model="gpt-4.1", # Change this to the model you want to use, e.g. gpt-4.1-2025-04-14, gemini-2.5-pro, gpt-5
215
  temperature=1.0,
216
  model_kwargs=model_kwargs,
217
  rag_config=rag_config,
 
65
  prompts = load_prompts_from_file(prompt_file)
66
  prompt = prompts[system_prompt]
67
 
 
 
 
68
  all_tools = {
69
  "TorchXRayVisionClassifierTool": lambda: TorchXRayVisionClassifierTool(device=device),
70
  "ArcPlusClassifierTool": lambda: ArcPlusClassifierTool(cache_dir=model_dir, device=device),
 
88
  "MedSAM2Tool": lambda: MedSAM2Tool(
89
  device=device, cache_dir=model_dir, temp_dir=temp_dir
90
  ),
91
+ "MedGemmaVQATool": lambda: MedGemmaAPIClientTool(cache_dir=model_dir, device=device, api_url=os.getenv("MEDGEMMA_API_URL", "http://172.17.8.141:8002"))
92
  }
93
 
94
  # Initialize only selected tools or all if none specified
 
208
  model_dir="/model-weights",
209
  temp_dir="temp2", # Change this to the path of the temporary directory
210
  device="cuda:0",
211
+ model="gpt-5", # Change this to the model you want to use, e.g. gpt-4.1-2025-04-14, gemini-2.5-pro, gpt-5
212
  temperature=1.0,
213
  model_kwargs=model_kwargs,
214
  rag_config=rag_config,