Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -448,7 +448,7 @@ import datetime
|
|
| 448 |
SECRET_CODE = "ilovemypythonprogram"
|
| 449 |
BASE_API_URL = "https://my-model-api.shares.zrok.io/api/training/"
|
| 450 |
|
| 451 |
-
def predict_crypto_gradio(crypto_name, limit, timeframe_lstm, market_type, ohlcv_timeframe):
|
| 452 |
# Calculate validation_date
|
| 453 |
now_utc = datetime.datetime.utcnow()
|
| 454 |
if 'd' in ohlcv_timeframe.lower():
|
|
@@ -539,7 +539,6 @@ iface = gr.Interface(
|
|
| 539 |
inputs=[
|
| 540 |
gr.Dropdown(["BTC", "ETH"], label="Cryptocurrency"),
|
| 541 |
gr.Number(value=500, label="Data Limit (e.g., 500 days/hours)", info="Number of historical data points to fetch."),
|
| 542 |
-
gr.Slider(minimum=5, maximum=20, step=1, value=12, label="Timeframe (LSTM Timesteps)", info="Number of timesteps for the LSTM model."),
|
| 543 |
gr.Radio(["bull", "bearish"], label="Market Type", value="bull", info="Predict for bullish (increase) or bearish (decrease) market."),
|
| 544 |
gr.Dropdown(["1d", "12h", "6h", "4h", "2h"], label="OHLCV Timeframe", value="1d", info="Granularity of historical data (e.g., 1 day, 4 hours).")
|
| 545 |
],
|
|
|
|
| 448 |
SECRET_CODE = "ilovemypythonprogram"
|
| 449 |
BASE_API_URL = "https://my-model-api.shares.zrok.io/api/training/"
|
| 450 |
|
| 451 |
+
def predict_crypto_gradio(crypto_name, limit, timeframe_lstm=12, market_type, ohlcv_timeframe):
|
| 452 |
# Calculate validation_date
|
| 453 |
now_utc = datetime.datetime.utcnow()
|
| 454 |
if 'd' in ohlcv_timeframe.lower():
|
|
|
|
| 539 |
inputs=[
|
| 540 |
gr.Dropdown(["BTC", "ETH"], label="Cryptocurrency"),
|
| 541 |
gr.Number(value=500, label="Data Limit (e.g., 500 days/hours)", info="Number of historical data points to fetch."),
|
|
|
|
| 542 |
gr.Radio(["bull", "bearish"], label="Market Type", value="bull", info="Predict for bullish (increase) or bearish (decrease) market."),
|
| 543 |
gr.Dropdown(["1d", "12h", "6h", "4h", "2h"], label="OHLCV Timeframe", value="1d", info="Granularity of historical data (e.g., 1 day, 4 hours).")
|
| 544 |
],
|