freegpu commited on
Commit
390fb40
·
verified ·
1 Parent(s): db79667

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -323,7 +323,7 @@ def run_prediction_for_gradio(limit, tsym, crypto_name, timeframe):
323
  data_to_send = {
324
  "timeframe": timeframe,
325
  "crypto_name": crypto_name,
326
- "tysm": tysm,
327
  }
328
 
329
  # 2. Define the target URL
@@ -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.json().get("id"),
361
  "secret": SECRET_CODE,
362
  "crypto_name": crypto_name,
363
  "timeframe": timeframe,
@@ -373,10 +373,9 @@ def run_prediction_for_gradio(limit, tsym, crypto_name, timeframe):
373
  print(f"Error sending trained status: {e}")
374
  output_str += f"\nError sending trained status to backend: {e}"
375
  # Format the predicted values for display in Gradio
376
- output_string = f"--- Next {future_forcecast_steps}-Day Future Forecast ---\n"
377
- for day, price in enumerate(predicted_values, 1):
378
- output_string += f"Day {day}: {price:.2f}\n"
379
- return output_string
380
 
381
 
382
 
 
323
  data_to_send = {
324
  "timeframe": timeframe,
325
  "crypto_name": crypto_name,
326
+ "tysm": tsym,
327
  }
328
 
329
  # 2. Define the target URL
 
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,
 
373
  print(f"Error sending trained status: {e}")
374
  output_str += f"\nError sending trained status to backend: {e}"
375
  # Format the predicted values for display in Gradio
376
+
377
+
378
+ return True
 
379
 
380
 
381