Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -105,9 +105,9 @@ def predict_next_day(symbol, timeframe):
|
|
105 |
|
106 |
def plot_candlestick(data, symbol, timeframe, predicted_price=None):
|
107 |
"""Plots the candlestick chart with technical indicators."""
|
108 |
-
if
|
109 |
raise ValueError("No valid data to plot. Please check your inputs.")
|
110 |
-
|
111 |
fig, ax = plt.subplots(figsize=(12, 6))
|
112 |
mpf.plot(data, type='candle', style='charles', ax=ax, volume=True, show_nontrading=True)
|
113 |
|
@@ -126,6 +126,7 @@ def plot_candlestick(data, symbol, timeframe, predicted_price=None):
|
|
126 |
fig.tight_layout()
|
127 |
return fig
|
128 |
|
|
|
129 |
def main():
|
130 |
"""Gradio Interface."""
|
131 |
|
|
|
105 |
|
106 |
def plot_candlestick(data, symbol, timeframe, predicted_price=None):
|
107 |
"""Plots the candlestick chart with technical indicators."""
|
108 |
+
if data.empty:
|
109 |
raise ValueError("No valid data to plot. Please check your inputs.")
|
110 |
+
|
111 |
fig, ax = plt.subplots(figsize=(12, 6))
|
112 |
mpf.plot(data, type='candle', style='charles', ax=ax, volume=True, show_nontrading=True)
|
113 |
|
|
|
126 |
fig.tight_layout()
|
127 |
return fig
|
128 |
|
129 |
+
|
130 |
def main():
|
131 |
"""Gradio Interface."""
|
132 |
|