Delete app.py
Browse files
app.py
DELETED
|
@@ -1,34 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
import os
|
| 3 |
-
import time
|
| 4 |
-
from pathlib import Path
|
| 5 |
-
|
| 6 |
-
import gradio as gr
|
| 7 |
-
|
| 8 |
-
BASE_DIR = Path(__file__).resolve().parent
|
| 9 |
-
|
| 10 |
-
def load_css() -> str:
|
| 11 |
-
css_path = BASE_DIR / "style.css"
|
| 12 |
-
if css_path.exists():
|
| 13 |
-
return css_path.read_text(encoding="utf-8")
|
| 14 |
-
return ""
|
| 15 |
-
|
| 16 |
-
def run_dummy():
|
| 17 |
-
return "Pipeline executed successfully at " + time.strftime("%H:%M:%S")
|
| 18 |
-
|
| 19 |
-
css_text = load_css()
|
| 20 |
-
|
| 21 |
-
with gr.Blocks(title="RX12 Workshop App", css=css_text) as demo:
|
| 22 |
-
|
| 23 |
-
gr.Markdown(
|
| 24 |
-
"# RX12 - Intro to Python and R - Workshop App
|
| 25 |
-
"
|
| 26 |
-
"*Docker Version – CSS injected via Blocks(css=...)*"
|
| 27 |
-
)
|
| 28 |
-
|
| 29 |
-
with gr.Tab("Pipeline Runner"):
|
| 30 |
-
btn = gr.Button("Run Pipeline", variant="primary")
|
| 31 |
-
log = gr.Textbox(label="Execution Log", lines=10)
|
| 32 |
-
btn.click(run_dummy, outputs=log)
|
| 33 |
-
|
| 34 |
-
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|