Spaces:
Sleeping
Sleeping
Update app.py
Browse files313 unmodified lines31431531631731831932028 unmodified lines34935035135235335435528 unmodified lines384385386387388389390313 unmodified linesSECRET_CODE = "ilovemypythonprogram"BASE_API_URL = "https://my-model-api.shares.zrok.io/api/training/"def run_prediction_for_gradio(limit, tsym, crypto_name, timeframe):# Calculate validation_datenow = datetime.now(timezone.utc)28 unmodified lines# 1. Send PENDING statuspredictionID = result.get("id")# Call the train_full function to get predictionspredicted_values = train_full(limit, tsym, crypto_name, timeframe)# Initialize output_str before potential use in except blockoutput_str = ""28 unmodified linesiface = gr.Interface(fn=run_prediction_for_gradio,inputs=[gr.Slider(minimum=100, maximum=2000, value=800, step=100, label="Limit (Number of data points)"),gr.Dropdown(choices=["USD", "EUR", "GBP"], value="USD", label="Target Symbol (tsym)"),gr.Dropdown(choices=["BTC", "ETH", "SOL"], value="ETH", label="Crypto Name"),gr.Dropdown(choices=["1d", "3d", "1h", "4h", "6h", "12h"], value="1d", label="Timeframe")313 unmodified lines31431531631731831932032128 unmodified lines35035135235335435535628 unmodified lines385386387388389390391313 unmodified linesSECRET_CODE = "ilovemypythonprogram"BASE_API_URL = "https://my-model-api.shares.zrok.io/api/training/"def run_prediction_for_gradio(tsym, crypto_name, timeframe):limit = 800# Calculate validation_datenow = datetime.now(timezone.utc)28 unmodified lines# 1. Send PENDING statuspredictionID = result.get("id")# Call the train_full function to get predictionspredicted_values = train_full(tsym, crypto_name, timeframe)# Initialize output_str before potential use in except blockoutput_str = ""28 unmodified linesiface = gr.Interface(fn=run_prediction_for_gradio,inputs=[gr.Dropdown(choices=["USD", "EUR", "GBP"], value="USD", label="Target Symbol (tsym)"),gr.Dropdown(choices=["BTC", "ETH", "SOL"], value="ETH", label="Crypto Name"),gr.Dropdown(choices=["1d", "3d", "1h", "4h", "6h", "12h"], value="1d", label="Timeframe")
app.py+4-3