NSC9 commited on
Commit
8bd8f11
·
1 Parent(s): b42f75b

Create new file

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from dotenv import load_dotenv
3
+ from subprocess import Popen
4
+ load_dotenv()
5
+
6
+ my_env = os.environ.copy()
7
+ #
8
+ # Please set your username and your Space name
9
+ #
10
+ my_env["HF_SPACE"] = "embed/NSC9/Artificial_Calculus_Teacher"
11
+
12
+ command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}"]
13
+ print(command)
14
+ worker = Popen(command, env=my_env)
15
+ worker.wait()