Spaces:
Sleeping
Sleeping
update utils
Browse files
utils.py
CHANGED
|
@@ -279,8 +279,7 @@ def predict_prices(data, model, tokenizer, prediction_days=30):
|
|
| 279 |
prediction_input,
|
| 280 |
prediction_length=prediction_days,
|
| 281 |
temperature=1.0,
|
| 282 |
-
top_k=50
|
| 283 |
-
top_p=0.9
|
| 284 |
)
|
| 285 |
|
| 286 |
predictions = forecast[0].numpy()
|
|
@@ -458,7 +457,7 @@ def create_technical_chart(data, indicators):
|
|
| 458 |
|
| 459 |
def create_prediction_chart(data, predictions):
|
| 460 |
"""Create prediction visualization"""
|
| 461 |
-
#
|
| 462 |
if not len(predictions['values']):
|
| 463 |
return go.Figure()
|
| 464 |
|
|
|
|
| 279 |
prediction_input,
|
| 280 |
prediction_length=prediction_days,
|
| 281 |
temperature=1.0,
|
| 282 |
+
# REMOVED: 'top_k=50' and 'top_p=0.9' to eliminate warnings
|
|
|
|
| 283 |
)
|
| 284 |
|
| 285 |
predictions = forecast[0].numpy()
|
|
|
|
| 457 |
|
| 458 |
def create_prediction_chart(data, predictions):
|
| 459 |
"""Create prediction visualization"""
|
| 460 |
+
# Use len() check which works for both list and numpy array
|
| 461 |
if not len(predictions['values']):
|
| 462 |
return go.Figure()
|
| 463 |
|