Mustafa Akcanca commited on
Commit
e14270b
Β·
1 Parent(s): 9e35b77

Remove gpt-4

Browse files
README.md CHANGED
@@ -19,7 +19,7 @@ A simplified forensic image analysis system that uses an LLM agent to analyze im
19
  This project focuses on **agent flows and tool usage** rather than model-based classification. The agent:
20
 
21
  1. Receives an image directly
22
- 2. Uses vision-capable LLM (e.g., GPT-4o) to analyze it
23
  3. Can invoke forensic tools to gather additional evidence
24
  4. Provides reasoning and conclusions based on evidence
25
 
@@ -75,7 +75,7 @@ python scripts/analyze_image.py --image path/to/image.jpg --query "Is this image
75
 
76
  Use a different model:
77
  ```powershell
78
- python scripts/analyze_image.py --image path/to/image.jpg --model gpt-4o --temperature 0.3
79
  ```
80
 
81
  ## Architecture
 
19
  This project focuses on **agent flows and tool usage** rather than model-based classification. The agent:
20
 
21
  1. Receives an image directly
22
+ 2. Uses vision-capable LLM (e.g., GPT-5.1) to analyze it
23
  3. Can invoke forensic tools to gather additional evidence
24
  4. Provides reasoning and conclusions based on evidence
25
 
 
75
 
76
  Use a different model:
77
  ```powershell
78
+ python scripts/analyze_image.py --image path/to/image.jpg --model gpt-5.1 --temperature 0.3
79
  ```
80
 
81
  ## Architecture
README_SPACE.md CHANGED
@@ -4,7 +4,7 @@ AI-powered forensic image analysis system that detects AI-generated, manipulated
4
 
5
  ## πŸš€ Features
6
 
7
- - **Vision Analysis**: Direct image analysis using GPT-4 Vision
8
  - **Forensic Tools**: Multiple forensic analysis tools including:
9
  - JPEG compression analysis
10
  - Frequency domain analysis (DCT/FFT)
@@ -59,7 +59,7 @@ OPENAI_API_KEY=your-key-here
59
  2. **Optional Query**: Add a specific question about the image (e.g., "Is this AI-generated?")
60
  3. **Configure Settings**:
61
  - Enable/disable forensic tools
62
- - Choose LLM model (gpt-4o recommended)
63
  - Adjust temperature
64
  4. **Analyze**: Click "πŸ” Analyze Image" button
65
  5. **View Results**: See detailed analysis with visual description, forensic findings, and conclusion
@@ -67,10 +67,10 @@ OPENAI_API_KEY=your-key-here
67
  ## βš™οΈ Configuration
68
 
69
  ### Models Supported
70
- - `gpt-4o` (recommended) - Latest vision model
71
- - `gpt-4o-mini` - Faster, more cost-effective
72
- - `gpt-4-turbo` - Previous generation
73
- - `gpt-4` - Standard GPT-4
74
 
75
  ### Forensic Tools
76
  When enabled, the agent can use:
@@ -114,7 +114,7 @@ When enabled, the agent can use:
114
  - Check that all dependencies are installed correctly
115
 
116
  ### Memory Issues
117
- - Use `gpt-4o-mini` for lower memory usage
118
  - Disable forensic tools if running on CPU-only hardware
119
 
120
  ## πŸ“ License
@@ -124,6 +124,6 @@ When enabled, the agent can use:
124
  ## πŸ™ Acknowledgments
125
 
126
  - Built with [LangChain](https://www.langchain.com/) and [LangGraph](https://github.com/langchain-ai/langgraph)
127
- - Powered by [OpenAI GPT-4 Vision](https://openai.com/)
128
  - UI built with [Gradio](https://www.gradio.app/)
129
 
 
4
 
5
  ## πŸš€ Features
6
 
7
+ - **Vision Analysis**: Direct image analysis using GPT-5
8
  - **Forensic Tools**: Multiple forensic analysis tools including:
9
  - JPEG compression analysis
10
  - Frequency domain analysis (DCT/FFT)
 
59
  2. **Optional Query**: Add a specific question about the image (e.g., "Is this AI-generated?")
60
  3. **Configure Settings**:
61
  - Enable/disable forensic tools
62
+ - Choose LLM model (gpt-5.1 recommended)
63
  - Adjust temperature
64
  4. **Analyze**: Click "πŸ” Analyze Image" button
65
  5. **View Results**: See detailed analysis with visual description, forensic findings, and conclusion
 
67
  ## βš™οΈ Configuration
68
 
69
  ### Models Supported
70
+ - `gpt-5.1` (recommended) - Latest vision model
71
+ - `gpt-5` - Standard GPT-5
72
+ - `gpt-5-mini` - Faster, more cost-effective
73
+ - `gpt-5-nano` - Lightweight option
74
 
75
  ### Forensic Tools
76
  When enabled, the agent can use:
 
114
  - Check that all dependencies are installed correctly
115
 
116
  ### Memory Issues
117
+ - Use `gpt-5-mini` for lower memory usage
118
  - Disable forensic tools if running on CPU-only hardware
119
 
120
  ## πŸ“ License
 
124
  ## πŸ™ Acknowledgments
125
 
126
  - Built with [LangChain](https://www.langchain.com/) and [LangGraph](https://github.com/langchain-ai/langgraph)
127
+ - Powered by [OpenAI GPT-5](https://openai.com/)
128
  - UI built with [Gradio](https://www.gradio.app/)
129
 
app.py CHANGED
@@ -59,7 +59,7 @@ agent_config: dict = {} # Store current agent configuration
59
 
60
 
61
  def initialize_agent(
62
- model_name: str = "gpt-4o",
63
  temperature: float = 0.2,
64
  reasoning_effort: Optional[str] = None,
65
  use_tools: bool = True
@@ -105,7 +105,7 @@ def analyze_image(
105
  image,
106
  query: Optional[str] = None,
107
  use_tools: bool = True,
108
- model_name: str = "gpt-4o",
109
  temperature: float = 0.2,
110
  reasoning_effort: Optional[str] = None,
111
  ):
@@ -301,7 +301,7 @@ def respond_chat(
301
  message: str,
302
  history: list,
303
  use_tools: bool = True,
304
- model_name: str = "gpt-4o",
305
  temperature: float = 0.2,
306
  reasoning_effort: Optional[str] = None,
307
  ):
@@ -513,8 +513,8 @@ def create_interface():
513
 
514
  model_dropdown = gr.Dropdown(
515
  label="LLM Model",
516
- choices=["gpt-4o", "gpt-4o-mini", "gpt-4-turbo", "gpt-4"],
517
- value="gpt-4o",
518
  info="OpenAI model to use for analysis"
519
  )
520
 
@@ -574,7 +574,7 @@ def create_interface():
574
  <div style="text-align: center; padding: 20px; color: #666;">
575
  <p>
576
  <strong>Forensic Image Analysis Agent</strong> |
577
- Powered by LangChain, LangGraph, and OpenAI GPT-4 Vision
578
  </p>
579
  <p style="font-size: 0.9em;">
580
  This agent analyzes images using vision-capable LLMs and forensic tools to detect
@@ -609,8 +609,8 @@ def create_chat_interface():
609
  ),
610
  gr.Dropdown(
611
  label="LLM Model",
612
- choices=["gpt-4o", "gpt-4o-mini", "gpt-4-turbo", "gpt-4"],
613
- value="gpt-4o",
614
  info="OpenAI model to use"
615
  ),
616
  gr.Slider(
 
59
 
60
 
61
  def initialize_agent(
62
+ model_name: str = "gpt-5.1",
63
  temperature: float = 0.2,
64
  reasoning_effort: Optional[str] = None,
65
  use_tools: bool = True
 
105
  image,
106
  query: Optional[str] = None,
107
  use_tools: bool = True,
108
+ model_name: str = "gpt-5.1",
109
  temperature: float = 0.2,
110
  reasoning_effort: Optional[str] = None,
111
  ):
 
301
  message: str,
302
  history: list,
303
  use_tools: bool = True,
304
+ model_name: str = "gpt-5.1",
305
  temperature: float = 0.2,
306
  reasoning_effort: Optional[str] = None,
307
  ):
 
513
 
514
  model_dropdown = gr.Dropdown(
515
  label="LLM Model",
516
+ choices=["gpt-5", "gpt-5.1", "gpt-5-mini", "gpt-5-nano"],
517
+ value="gpt-5.1",
518
  info="OpenAI model to use for analysis"
519
  )
520
 
 
574
  <div style="text-align: center; padding: 20px; color: #666;">
575
  <p>
576
  <strong>Forensic Image Analysis Agent</strong> |
577
+ Powered by LangChain, LangGraph, and OpenAI GPT-5
578
  </p>
579
  <p style="font-size: 0.9em;">
580
  This agent analyzes images using vision-capable LLMs and forensic tools to detect
 
609
  ),
610
  gr.Dropdown(
611
  label="LLM Model",
612
+ choices=["gpt-5", "gpt-5.1", "gpt-5-mini", "gpt-5-nano"],
613
+ value="gpt-5.1",
614
  info="OpenAI model to use"
615
  ),
616
  gr.Slider(
scripts/analyze_image.py CHANGED
@@ -31,8 +31,8 @@ def main():
31
  parser.add_argument(
32
  "--model",
33
  type=str,
34
- default="gpt-4o",
35
- help="LLM model to use (default: gpt-4o)"
36
  )
37
  parser.add_argument(
38
  "--temperature",
 
31
  parser.add_argument(
32
  "--model",
33
  type=str,
34
+ default="gpt-5.1",
35
+ help="LLM model to use (default: gpt-5.1)"
36
  )
37
  parser.add_argument(
38
  "--temperature",
src/agents/forensic_agent.py CHANGED
@@ -45,7 +45,7 @@ class ForensicAgent:
45
  max_iterations: Optional[int] = 50):
46
  """
47
  Args:
48
- llm_model: OpenAI model name (should support vision, e.g., gpt-4o)
49
  temperature: LLM temperature
50
  reasoning_effort: Reasoning effort level for the model
51
  api_key: OpenAI API key (or set OPENAI_API_KEY env var)
 
45
  max_iterations: Optional[int] = 50):
46
  """
47
  Args:
48
+ llm_model: OpenAI model name (should support vision, e.g., gpt-5.1)
49
  temperature: LLM temperature
50
  reasoning_effort: Reasoning effort level for the model
51
  api_key: OpenAI API key (or set OPENAI_API_KEY env var)