Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -172,19 +172,20 @@ with gr.Blocks(fill_height=True) as demo:
|
|
| 172 |
with gr.Row():
|
| 173 |
with gr.Column():
|
| 174 |
start_input = gr.Textbox(label="Start Date:", placeholder="Enter date (e.g., 2023-09-01)", max_lines=1)
|
| 175 |
-
gr.Markdown("
|
| 176 |
with gr.Column():
|
| 177 |
prediction_input = gr.Text(label="Month Prediction:", placeholder="Enter date (e.g., 2024-10-31)", max_lines=1)
|
| 178 |
-
gr.Markdown("
|
| 179 |
with gr.Column():
|
| 180 |
range_input = gr.Slider(3, 12, 6, label="Window / Moving Average Period")
|
| 181 |
-
gr.Markdown("
|
| 182 |
|
| 183 |
-
|
| 184 |
-
|
|
|
|
| 185 |
table_2 = gr.DataFrame(value=df_2, label="Forecast Inputs:")
|
| 186 |
|
| 187 |
-
|
| 188 |
|
| 189 |
# Configure the buttons and the panel visibility
|
| 190 |
btn_1.click(check_words, inputs=[user_text, input_text], outputs=[panel_2, panel_1])
|
|
|
|
| 172 |
with gr.Row():
|
| 173 |
with gr.Column():
|
| 174 |
start_input = gr.Textbox(label="Start Date:", placeholder="Enter date (e.g., 2023-09-01)", max_lines=1)
|
| 175 |
+
gr.Markdown("Start of the data range of months that will be used as input by the model for revenue prediction.<br><br>The end month is automatically set to one month before the prediction month.")
|
| 176 |
with gr.Column():
|
| 177 |
prediction_input = gr.Text(label="Month Prediction:", placeholder="Enter date (e.g., 2024-10-31)", max_lines=1)
|
| 178 |
+
gr.Markdown("Case creation month to predict its revenue.")
|
| 179 |
with gr.Column():
|
| 180 |
range_input = gr.Slider(3, 12, 6, label="Window / Moving Average Period")
|
| 181 |
+
gr.Markdown("Window = 3-period/months, the predictive model reacts more quickly to recent monthly payment fluctuations, but it may also include more noise.<br><br>Window = 12-period/months, the Forecast adjusts more slowly and is less sensitive to small fluctuations, making it more reliable, but also slower to react to sharp changes.")
|
| 182 |
|
| 183 |
+
table_1 = gr.DataFrame(value=df, label="Predictions (consult 'revenue' column):")
|
| 184 |
+
btn_update = gr.Button("Run Forecast")
|
| 185 |
+
btn_update.click(fn=update_table, inputs=[start_input, prediction_input, range_input, user_text], outputs=[table_1,table_2])
|
| 186 |
table_2 = gr.DataFrame(value=df_2, label="Forecast Inputs:")
|
| 187 |
|
| 188 |
+
|
| 189 |
|
| 190 |
# Configure the buttons and the panel visibility
|
| 191 |
btn_1.click(check_words, inputs=[user_text, input_text], outputs=[panel_2, panel_1])
|