LPX55 commited on
Commit
29f83d8
·
verified ·
1 Parent(s): ed7026a

minor adjustments

Browse files

still on the hunt for the power sucker

Files changed (1) hide show
  1. app.py +8 -12
app.py CHANGED
@@ -6,11 +6,9 @@ import os
6
  import time
7
  import logging
8
  import io
9
- import collections # Import collections
10
- import onnxruntime # Import onnxruntime
11
 
12
- # Assuming these are available from your utils and agents directories
13
- # You might need to adjust paths or copy these functions/classes if they are not directly importable.
14
  from utils.utils import softmax, augment_image
15
  from forensics.gradient import gradient_processing
16
  from forensics.minmax import minmax_process
@@ -678,11 +676,11 @@ minmax_processing_interface = gr.Interface(
678
  # api_name="augment_image"
679
  # )
680
 
681
- def get_captured_logs():
682
- # Retrieve all logs from the queue and clear it
683
- logs = list(log_queue)
684
- log_queue.clear() # Clear the queue after retrieving
685
- return "\n".join(logs)
686
 
687
 
688
  demo = gr.TabbedInterface(
@@ -711,9 +709,7 @@ demo = gr.TabbedInterface(
711
 
712
  )
713
 
714
- # Add live update for the logs textbox
715
- # demo.load(get_captured_logs, None, demo.outputs[8], every=1)
716
- demo.queue(max_size=4)
717
 
718
  if __name__ == "__main__":
719
  demo.launch(mcp_server=True)
 
6
  import time
7
  import logging
8
  import io
9
+ import collections
10
+ import onnxruntime
11
 
 
 
12
  from utils.utils import softmax, augment_image
13
  from forensics.gradient import gradient_processing
14
  from forensics.minmax import minmax_process
 
676
  # api_name="augment_image"
677
  # )
678
 
679
+ # def get_captured_logs():
680
+ # # Retrieve all logs from the queue and clear it
681
+ # logs = list(log_queue)
682
+ # log_queue.clear() # Clear the queue after retrieving
683
+ # return "\n".join(logs)
684
 
685
 
686
  demo = gr.TabbedInterface(
 
709
 
710
  )
711
 
712
+ demo.queue(max_size=3)
 
 
713
 
714
  if __name__ == "__main__":
715
  demo.launch(mcp_server=True)