Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -123,7 +123,6 @@ def gradio_train_stock_model(stock_symbol, start_date, end_date, feature_range_m
|
|
123 |
learning_rate=learning_rate
|
124 |
)
|
125 |
return f"Training initiated for {stock_symbol} from {start_date} to {end_date}."
|
126 |
-
|
127 |
iface = gr.Interface(
|
128 |
fn=gradio_train_stock_model,
|
129 |
inputs=[
|
@@ -138,7 +137,25 @@ iface = gr.Interface(
|
|
138 |
gr.Slider(minimum=1e-5, maximum=1e-1, step=1e-5, label="Learning Rate", value=2e-4)
|
139 |
],
|
140 |
outputs="text",
|
141 |
-
live=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
)
|
143 |
|
144 |
iface.launch()
|
|
|
123 |
learning_rate=learning_rate
|
124 |
)
|
125 |
return f"Training initiated for {stock_symbol} from {start_date} to {end_date}."
|
|
|
126 |
iface = gr.Interface(
|
127 |
fn=gradio_train_stock_model,
|
128 |
inputs=[
|
|
|
137 |
gr.Slider(minimum=1e-5, maximum=1e-1, step=1e-5, label="Learning Rate", value=2e-4)
|
138 |
],
|
139 |
outputs="text",
|
140 |
+
live=False,
|
141 |
+
layout="vertical"
|
142 |
+
)
|
143 |
+
|
144 |
+
iface.add_button(
|
145 |
+
label="Train Model",
|
146 |
+
fn=gradio_train_stock_model,
|
147 |
+
inputs=[
|
148 |
+
gr.Textbox(label="Stock Symbol", value="LUNC-USD"),
|
149 |
+
gr.Textbox(label="Start Date", value="2023-01-01"),
|
150 |
+
gr.Textbox(label="End Date", value="2024-08-24"),
|
151 |
+
gr.Slider(minimum=0, maximum=100, step=1, label="Feature Range Min", value=10),
|
152 |
+
gr.Slider(minimum=0, maximum=100, step=1, label="Feature Range Max", value=100),
|
153 |
+
gr.Slider(minimum=1, maximum=512, step=1, label="Data Sequence Length", value=256),
|
154 |
+
gr.Slider(minimum=1, maximum=50, step=1, label="Epochs", value=10),
|
155 |
+
gr.Slider(minimum=1, maximum=64, step=1, label="Batch Size", value=16),
|
156 |
+
gr.Slider(minimum=1e-5, maximum=1e-1, step=1e-5, label="Learning Rate", value=2e-4)
|
157 |
+
],
|
158 |
+
outputs="text"
|
159 |
)
|
160 |
|
161 |
iface.launch()
|