freegpu commited on
Commit
4d38bb5
·
verified ·
1 Parent(s): a07c960

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -346,7 +346,7 @@ def run_prediction_for_gradio(limit, tsym, crypto_name, timeframe):
346
  except Exception as err:
347
  print(f"An error occurred: {err}")
348
  # 1. Send PENDING status
349
-
350
  # Call the train_full function to get predictions
351
  predicted_values = train_full(limit, tsym, crypto_name, timeframe)
352
 
@@ -357,7 +357,7 @@ def run_prediction_for_gradio(limit, tsym, crypto_name, timeframe):
357
  # 1. Send TRAINED status
358
  trained_url = f"{BASE_API_URL}insert-trained/"
359
  trained_data = {
360
- "pendingId": result.get("id"),
361
  "secret": SECRET_CODE,
362
  "crypto_name": crypto_name,
363
  "timeframe": timeframe,
 
346
  except Exception as err:
347
  print(f"An error occurred: {err}")
348
  # 1. Send PENDING status
349
+ predictionID = result.get("id")
350
  # Call the train_full function to get predictions
351
  predicted_values = train_full(limit, tsym, crypto_name, timeframe)
352
 
 
357
  # 1. Send TRAINED status
358
  trained_url = f"{BASE_API_URL}insert-trained/"
359
  trained_data = {
360
+ "pendingId": predictionID,
361
  "secret": SECRET_CODE,
362
  "crypto_name": crypto_name,
363
  "timeframe": timeframe,