Update app.py
Browse files
app.py
CHANGED
|
@@ -2,13 +2,31 @@ import gradio as gr
|
|
| 2 |
import subprocess
|
| 3 |
import threading
|
| 4 |
import os
|
|
|
|
|
|
|
| 5 |
print("=== DEBUG: Listing files ===")
|
| 6 |
os.system("find / -name 'FeelingSurfViewer' 2>/dev/null")
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Start FeelingSurf in background
|
| 9 |
def start_feelingsurf():
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# Start in background thread
|
| 14 |
threading.Thread(target=start_feelingsurf, daemon=True).start()
|
|
|
|
| 2 |
import subprocess
|
| 3 |
import threading
|
| 4 |
import os
|
| 5 |
+
|
| 6 |
+
# DEBUG: Find where FeelingSurf is
|
| 7 |
print("=== DEBUG: Listing files ===")
|
| 8 |
os.system("find / -name 'FeelingSurfViewer' 2>/dev/null")
|
| 9 |
+
os.system("ls -la /")
|
| 10 |
+
os.system("ls -la /app/")
|
| 11 |
|
| 12 |
# Start FeelingSurf in background
|
| 13 |
def start_feelingsurf():
|
| 14 |
+
# Try different possible paths
|
| 15 |
+
possible_paths = [
|
| 16 |
+
"/app/FeelingSurfViewer",
|
| 17 |
+
"/FeelingSurfViewer",
|
| 18 |
+
"./FeelingSurfViewer",
|
| 19 |
+
"FeelingSurfViewer"
|
| 20 |
+
]
|
| 21 |
+
|
| 22 |
+
for path in possible_paths:
|
| 23 |
+
if os.path.exists(path):
|
| 24 |
+
print(f"✅ Found FeelingSurf at: {path}")
|
| 25 |
+
os.chmod(path, 0o755)
|
| 26 |
+
subprocess.run([path, "--no-sandbox", "--headless", "--disable-gpu", "--token=d6e659ba6b59c9866fba8ff01bc56e04"])
|
| 27 |
+
return
|
| 28 |
+
|
| 29 |
+
print("❌ FeelingSurf binary not found in any location")
|
| 30 |
|
| 31 |
# Start in background thread
|
| 32 |
threading.Thread(target=start_feelingsurf, daemon=True).start()
|