Upload 2 files
Browse files- app.py +6 -3
- requirements.txt +3 -2
app.py
CHANGED
|
@@ -6,6 +6,8 @@ Stage 2: Streamlit Integration
|
|
| 6 |
import os
|
| 7 |
import sys
|
| 8 |
import subprocess
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Add the root directory to Python path
|
| 11 |
root_dir = os.path.dirname(os.path.abspath(__file__))
|
|
@@ -18,6 +20,7 @@ def setup_environment():
|
|
| 18 |
os.makedirs(os.path.join(root_dir, "storage", "tasks"), exist_ok=True)
|
| 19 |
os.makedirs(os.path.join(root_dir, "storage", "cache_videos"), exist_ok=True)
|
| 20 |
os.makedirs(os.path.join(root_dir, "storage", "temp"), exist_ok=True)
|
|
|
|
| 21 |
|
| 22 |
def load_env_variables():
|
| 23 |
"""Load environment variables into config"""
|
|
@@ -76,6 +79,7 @@ st.info("这是一个最小化版本,用于验证 Streamlit 集成。")
|
|
| 76 |
st.write("如果您看到这个页面,说明 Stage 2 部署成功!")
|
| 77 |
''')
|
| 78 |
streamlit_app = minimal_app
|
|
|
|
| 79 |
|
| 80 |
print(f"📄 Using Streamlit app: {streamlit_app}")
|
| 81 |
|
|
@@ -94,10 +98,9 @@ if __name__ == "__main__":
|
|
| 94 |
start_streamlit()
|
| 95 |
except Exception as e:
|
| 96 |
print(f"❌ Error starting application: {e}")
|
| 97 |
-
import traceback
|
| 98 |
traceback.print_exc()
|
| 99 |
# Keep process alive for debugging
|
| 100 |
-
|
| 101 |
while True:
|
| 102 |
-
print("⏰
|
| 103 |
time.sleep(30)
|
|
|
|
| 6 |
import os
|
| 7 |
import sys
|
| 8 |
import subprocess
|
| 9 |
+
import traceback
|
| 10 |
+
import time
|
| 11 |
|
| 12 |
# Add the root directory to Python path
|
| 13 |
root_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
| 20 |
os.makedirs(os.path.join(root_dir, "storage", "tasks"), exist_ok=True)
|
| 21 |
os.makedirs(os.path.join(root_dir, "storage", "cache_videos"), exist_ok=True)
|
| 22 |
os.makedirs(os.path.join(root_dir, "storage", "temp"), exist_ok=True)
|
| 23 |
+
print("✅ Storage directories created successfully")
|
| 24 |
|
| 25 |
def load_env_variables():
|
| 26 |
"""Load environment variables into config"""
|
|
|
|
| 79 |
st.write("如果您看到这个页面,说明 Stage 2 部署成功!")
|
| 80 |
''')
|
| 81 |
streamlit_app = minimal_app
|
| 82 |
+
print(f"✅ Created fallback minimal app at: {minimal_app}")
|
| 83 |
|
| 84 |
print(f"📄 Using Streamlit app: {streamlit_app}")
|
| 85 |
|
|
|
|
| 98 |
start_streamlit()
|
| 99 |
except Exception as e:
|
| 100 |
print(f"❌ Error starting application: {e}")
|
|
|
|
| 101 |
traceback.print_exc()
|
| 102 |
# Keep process alive for debugging
|
| 103 |
+
print("🔄 Keeping process alive for debugging...")
|
| 104 |
while True:
|
| 105 |
+
print("⏰ Process is alive, waiting...")
|
| 106 |
time.sleep(30)
|
requirements.txt
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
# Ultra-minimal requirements for testing deployment
|
| 2 |
# No dependencies - using only Python standard library
|
| 3 |
|
| 4 |
-
# Stage 2: Basic Streamlit with
|
| 5 |
streamlit==1.45.0
|
| 6 |
toml>=0.10.0
|
| 7 |
-
loguru==0.7.3
|
|
|
|
|
|
| 1 |
# Ultra-minimal requirements for testing deployment
|
| 2 |
# No dependencies - using only Python standard library
|
| 3 |
|
| 4 |
+
# Stage 2: Basic Streamlit with fixed protobuf version
|
| 5 |
streamlit==1.45.0
|
| 6 |
toml>=0.10.0
|
| 7 |
+
loguru==0.7.3
|
| 8 |
+
protobuf<4.0.0
|