Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -16,6 +16,10 @@ SESSION_NAME = "main"
|
|
| 16 |
async def index():
|
| 17 |
return FileResponse("static/index.html")
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
def ensure_session():
|
| 20 |
result = subprocess.run(
|
| 21 |
["tmux", "has-session", "-t", SESSION_NAME],
|
|
|
|
| 16 |
async def index():
|
| 17 |
return FileResponse("static/index.html")
|
| 18 |
|
| 19 |
+
@app.get("/api/pass")
|
| 20 |
+
async def get_pass():
|
| 21 |
+
return {"pass": os.environ.get("TERMINAL_PASS", "")}
|
| 22 |
+
|
| 23 |
def ensure_session():
|
| 24 |
result = subprocess.run(
|
| 25 |
["tmux", "has-session", "-t", SESSION_NAME],
|