Spaces:
Sleeping
Sleeping
Update app.py
Browse files313 unmodified lines31431531631731731831932032128 unmodified lines35035135235235335435535628 unmodified lines385386387387388389390391313 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):def run_prediction_for_gradio(tsym, crypto_name, timeframe): limit = 800 # Calculate validation_date now = datetime.now(timezone.utc)
28 unmodified lines # 1. Send PENDING status predictionID = result.get("id") # Call the train_full function to get predictions predicted_values = train_full(limit, tsym, crypto_name, timeframe) predicted_values = train_full(tsym, crypto_name, timeframe) # Initialize output_str before potential use in except block output_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")app.py+4-3