ElBeh commited on
Commit
dd039ce
·
verified ·
1 Parent(s): c8d7b19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -6
app.py CHANGED
@@ -1,23 +1,43 @@
1
  #!/usr/bin/env python3
2
  # -*- coding: utf-8 -*-
3
  """
4
- Created on Wed Oct 29 12:00:23 2025
5
 
 
6
  @author: standarduser
7
  """
8
 
9
  import gradio as gr
10
  from tabs.tab_videoframes import create_tab_videoframes
11
- from tabs.tab_help import create_tab_help
 
12
  from processing.image_processing import process_image
13
 
14
  # Gradio App erstellen
15
  with gr.Blocks() as demo:
16
- gr.Markdown("# SVAT - Synthetic Video Analyzing Tool")
17
-
 
 
 
 
18
  with gr.Tabs():
19
- create_tab_videoframes("Video-Frames", process_image)
20
- create_tab_help("Help")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
 
23
  if __name__ == "__main__":
 
1
  #!/usr/bin/env python3
2
  # -*- coding: utf-8 -*-
3
  """
4
+ SVAT - Synthetic Video Analyze Tool
5
 
6
+ Created on Wed Oct 29 12:00:23 2025
7
  @author: standarduser
8
  """
9
 
10
  import gradio as gr
11
  from tabs.tab_videoframes import create_tab_videoframes
12
+ from tabs.tab_fft import create_tab_image_fft
13
+ from tabs.tab_video_analysis import create_tab_video_analysis
14
  from processing.image_processing import process_image
15
 
16
  # Gradio App erstellen
17
  with gr.Blocks() as demo:
18
+ gr.Markdown("# SVAT - Synthetic Video Analyze Tool")
19
+ gr.Markdown("*Analyze videos for synthetic/AI-generated content artifacts*")
20
+
21
+ # Shared state for video frames across tabs
22
+ shared_video_frames = gr.State([])
23
+
24
  with gr.Tabs():
25
+ # Tab 1: Frame-by-frame analysis
26
+ video_frames_output = create_tab_videoframes("Video-Frames", process_image, shared_video_frames)
27
+
28
+ # Tab 2: Video-level analysis
29
+ video_analysis_frames = create_tab_video_analysis("Video Analysis")
30
+
31
+ # Tab 3: Help
32
+ create_tab_image_fft("Help")
33
+
34
+ # Connect the video frames state between tabs
35
+ # When frames are loaded in tab 1, update tab 2
36
+ video_frames_output.change(
37
+ fn=lambda frames: frames,
38
+ inputs=[video_frames_output],
39
+ outputs=[video_analysis_frames]
40
+ )
41
 
42
 
43
  if __name__ == "__main__":