Spaces:
Paused
Paused
Delete app.py
Browse files
app.py
DELETED
|
@@ -1,19 +0,0 @@
|
|
| 1 |
-
import subprocess
|
| 2 |
-
import sys
|
| 3 |
-
import os
|
| 4 |
-
|
| 5 |
-
def start_server():
|
| 6 |
-
# تحديد المنفذ الذي تتطلبه Hugging Face
|
| 7 |
-
os.environ["PORT"] = "7860"
|
| 8 |
-
|
| 9 |
-
print("Installing Node.js dependencies...")
|
| 10 |
-
# تثبيت حزم npm الموجودة في package.json
|
| 11 |
-
subprocess.run(["npm", "install"], check=True)
|
| 12 |
-
|
| 13 |
-
print("Starting Express server...")
|
| 14 |
-
# تشغيل خادم Node.js الخاص بنا
|
| 15 |
-
process = subprocess.Popen(["node", "server.js"], stdout=sys.stdout, stderr=sys.stderr)
|
| 16 |
-
process.wait()
|
| 17 |
-
|
| 18 |
-
if __name__ == "__main__":
|
| 19 |
-
start_server()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|