MogensR commited on
Commit
4bd2529
·
verified ·
1 Parent(s): 2cd1a25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -23
app.py CHANGED
@@ -1,29 +1,23 @@
1
  #!/usr/bin/env python3
2
- import sys, os
 
 
3
 
4
- print("=== STARTING ROOT APP.PY ===", flush=True)
5
- print(f"Python version: {sys.version}", flush=True)
6
- print(f"Current dir: {os.getcwd()}", flush=True)
7
- print(f"Files in current dir: {os.listdir('.')}", flush=True)
8
 
9
- sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
 
10
 
11
- try:
12
- print("=== ATTEMPTING TO IMPORT core.app ===", flush=True)
13
- from core.app import main
14
- print("=== IMPORT SUCCESSFUL ===", flush=True)
15
- except Exception as e:
16
- print(f"=== IMPORT FAILED: {e} ===", flush=True)
17
- import traceback
18
- traceback.print_exc()
19
- sys.exit(1)
20
 
21
  if __name__ == "__main__":
22
- print("=== CALLING main() ===", flush=True)
23
- try:
24
- main()
25
- except Exception as e:
26
- print(f"=== main() FAILED: {e} ===", flush=True)
27
- import traceback
28
- traceback.print_exc()
29
- sys.exit(1)
 
1
  #!/usr/bin/env python3
2
+ import gradio as gr
3
+ import sys
4
+ import os
5
 
6
+ print("=== MINIMAL TEST APP STARTING ===", flush=True)
7
+ print(f"Python: {sys.version}", flush=True)
8
+ print(f"Working dir: {os.getcwd()}", flush=True)
 
9
 
10
+ def test_function(text):
11
+ return f"Minimal app working! Input: {text}"
12
 
13
+ demo = gr.Interface(
14
+ fn=test_function,
15
+ inputs="text",
16
+ outputs="text",
17
+ title="BackgroundFX Pro - Minimal Test Mode"
18
+ )
 
 
 
19
 
20
  if __name__ == "__main__":
21
+ print("=== LAUNCHING MINIMAL GRADIO ===", flush=True)
22
+ demo.launch(server_name="0.0.0.0", server_port=7860)
23
+ print("=== LAUNCH COMPLETED ===", flush=True)