Spaces:
Running
Running
Update app.py
Browse files
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":
|
| 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.
|
| 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 |
-
|
| 377 |
-
|
| 378 |
-
|
| 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 |
|