Spaces:
Paused
Paused
fix
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ def install_packages():
|
|
| 13 |
# Instalar los paquetes necesarios si aún no están instalados
|
| 14 |
with open(log_file, "a") as f:
|
| 15 |
f.write("===== Installing Packages =====\n")
|
| 16 |
-
subprocess.run(['pip3', 'install', '
|
| 17 |
|
| 18 |
install_packages()
|
| 19 |
|
|
@@ -69,7 +69,7 @@ def home():
|
|
| 69 |
|
| 70 |
@app.route('/lab')
|
| 71 |
def lab():
|
| 72 |
-
return redirect("http://localhost:8898", code=302)
|
| 73 |
|
| 74 |
if __name__ == "__main__":
|
| 75 |
with open(log_file, "a") as f:
|
|
@@ -77,8 +77,5 @@ if __name__ == "__main__":
|
|
| 77 |
|
| 78 |
configure_jupyter()
|
| 79 |
start_jupyter()
|
| 80 |
-
|
| 81 |
-
# Deshabilitar los logs para Flask
|
| 82 |
-
WSGIRequestHandler.log_request = lambda self, *args, **kwargs: None
|
| 83 |
-
|
| 84 |
app.run(host='0.0.0.0', port=7860, debug=False)
|
|
|
|
| 13 |
# Instalar los paquetes necesarios si aún no están instalados
|
| 14 |
with open(log_file, "a") as f:
|
| 15 |
f.write("===== Installing Packages =====\n")
|
| 16 |
+
subprocess.run(['pip3', 'install', 'jupyterlab', 'flask', 'gradio'], check=True)
|
| 17 |
|
| 18 |
install_packages()
|
| 19 |
|
|
|
|
| 69 |
|
| 70 |
@app.route('/lab')
|
| 71 |
def lab():
|
| 72 |
+
return redirect("http://localhost:8898/lab", code=302)
|
| 73 |
|
| 74 |
if __name__ == "__main__":
|
| 75 |
with open(log_file, "a") as f:
|
|
|
|
| 77 |
|
| 78 |
configure_jupyter()
|
| 79 |
start_jupyter()
|
| 80 |
+
|
|
|
|
|
|
|
|
|
|
| 81 |
app.run(host='0.0.0.0', port=7860, debug=False)
|