Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,6 +25,9 @@ pass_2 = os.getenv("PASS_2_")
|
|
| 25 |
pass_3 = os.getenv("PASS_3_")
|
| 26 |
pass_4 = os.getenv("PASS_4_")
|
| 27 |
|
|
|
|
|
|
|
|
|
|
| 28 |
def get_run_status(run_id):
|
| 29 |
url = f"{DATABRICKS_INSTANCE}/api/2.1/jobs/runs/get?run_id={run_id}"
|
| 30 |
headers = {
|
|
@@ -129,6 +132,10 @@ def save_csv(file_name):
|
|
| 129 |
|
| 130 |
|
| 131 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
with gr.Row():
|
| 133 |
start_input = gr.Textbox(label="Start Date:", placeholder="Enter date (e.g., 2023-09-01)", max_lines=1)
|
| 134 |
prediction_input = gr.Text(label="Month Prediction:", placeholder="Enter date (e.g., 2024-10-31)", max_lines=1)
|
|
|
|
| 25 |
pass_3 = os.getenv("PASS_3_")
|
| 26 |
pass_4 = os.getenv("PASS_4_")
|
| 27 |
|
| 28 |
+
def update_message(request: gr.Request):
|
| 29 |
+
return f"Welcome, {request.username}"
|
| 30 |
+
|
| 31 |
def get_run_status(run_id):
|
| 32 |
url = f"{DATABRICKS_INSTANCE}/api/2.1/jobs/runs/get?run_id={run_id}"
|
| 33 |
headers = {
|
|
|
|
| 132 |
|
| 133 |
|
| 134 |
with gr.Blocks() as demo:
|
| 135 |
+
#m = gr.Markdown()
|
| 136 |
+
with gr.Row():
|
| 137 |
+
demo.load(update_message, None, gr.Markdown())
|
| 138 |
+
logout_button = gr.Button("Logout", link="/logout", scale=0)
|
| 139 |
with gr.Row():
|
| 140 |
start_input = gr.Textbox(label="Start Date:", placeholder="Enter date (e.g., 2023-09-01)", max_lines=1)
|
| 141 |
prediction_input = gr.Text(label="Month Prediction:", placeholder="Enter date (e.g., 2024-10-31)", max_lines=1)
|