Spaces:
Paused
Paused
fix
Browse files- app.py +7 -4
- requirements.txt +0 -4
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def configure_jupyter():
|
|
| 35 |
with open(config_file, 'w') as f:
|
| 36 |
f.write(f"""
|
| 37 |
c.ServerApp.ip = '0.0.0.0'
|
| 38 |
-
c.ServerApp.port =
|
| 39 |
c.ServerApp.open_browser = False
|
| 40 |
{password_config}
|
| 41 |
c.ServerApp.root_dir = '/home/user/app'
|
|
@@ -52,12 +52,15 @@ def start_jupyter():
|
|
| 52 |
def home():
|
| 53 |
def greet(name):
|
| 54 |
return f"Hello {name}!"
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
@app.route('/lab')
|
| 59 |
def lab():
|
| 60 |
-
return redirect("http://localhost:
|
| 61 |
|
| 62 |
if __name__ == "__main__":
|
| 63 |
with open(log_file, "a") as f:
|
|
|
|
| 35 |
with open(config_file, 'w') as f:
|
| 36 |
f.write(f"""
|
| 37 |
c.ServerApp.ip = '0.0.0.0'
|
| 38 |
+
c.ServerApp.port = 8898
|
| 39 |
c.ServerApp.open_browser = False
|
| 40 |
{password_config}
|
| 41 |
c.ServerApp.root_dir = '/home/user/app'
|
|
|
|
| 52 |
def home():
|
| 53 |
def greet(name):
|
| 54 |
return f"Hello {name}!"
|
| 55 |
+
|
| 56 |
+
with gr.Blocks() as demo:
|
| 57 |
+
gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 58 |
+
|
| 59 |
+
return demo.launch(inline=True)
|
| 60 |
|
| 61 |
@app.route('/lab')
|
| 62 |
def lab():
|
| 63 |
+
return redirect("http://localhost:8898", code=302)
|
| 64 |
|
| 65 |
if __name__ == "__main__":
|
| 66 |
with open(log_file, "a") as f:
|
requirements.txt
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
flask
|
| 2 |
-
gradio
|
| 3 |
-
jupyterlab
|
| 4 |
-
werkzeug
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|